File tree Expand file tree Collapse file tree 3 files changed +11
-15
lines changed Expand file tree Collapse file tree 3 files changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ bump flags@(Flags _ _ knownVersions _ _) currentOutline@(Outline.PkgOutline _ _
7171suggestVersion :: Flags -> Outline. PkgOutline -> Outline. PkgOutline -> Task. Task Exit. Bump ()
7272suggestVersion flags@ (Flags _ root _ (Command. ProjectInfo _ currentSources currentDeps) (Command. ProjectInfo _ publishedSources publishedDeps)) currentOutline@ (Outline. PkgOutline _ _ _ vsn _ _ _ _) publishedOutline =
7373 do
74- oldDocs <- generateDocs root currentOutline currentSources currentDeps
75- newDocs <- generateDocs root publishedOutline publishedSources publishedDeps
74+ newDocs <- generateDocs root currentOutline currentSources currentDeps
75+ oldDocs <- generateDocs root publishedOutline publishedSources publishedDeps
7676 let changes = Diff. diff oldDocs newDocs
7777 let newVersion = Diff. bump changes vsn
7878 Task. io $
Original file line number Diff line number Diff line change @@ -41,11 +41,11 @@ data Flags = Flags
4141 deriving (Show )
4242
4343run :: Flags -> IO ()
44- run flags@ (Flags _ _ firstPackage secondPackage ) =
44+ run flags@ (Flags _ _ currentPackage publishedPackage ) =
4545 Reporting. attempt Exit. diffToReport $
46- case (Command. _project_outline firstPackage , Command. _project_outline secondPackage ) of
47- (Outline. Pkg firstOutline , Outline. Pkg secondOutline ) ->
48- Task. run (diff flags firstOutline secondOutline )
46+ case (Command. _project_outline currentPackage , Command. _project_outline publishedPackage ) of
47+ (Outline. Pkg currentOutline , Outline. Pkg publishedOutline ) ->
48+ Task. run (diff flags currentOutline publishedOutline )
4949 _ ->
5050 error " Received outlines are in the wrong format"
5151
@@ -55,10 +55,10 @@ type Task a =
5555 Task. Task Exit. Diff a
5656
5757diff :: Flags -> Outline. PkgOutline -> Outline. PkgOutline -> Task ()
58- diff (Flags _ root (Command. ProjectInfo _ firstSources firstSolution ) (Command. ProjectInfo _ secondSources secondSolution )) firstOutline secondOutline =
58+ diff (Flags _ root (Command. ProjectInfo _ currentSources currentSolution ) (Command. ProjectInfo _ publishedSources publishedSolution )) currentOutline publishedOutline =
5959 do
60- oldDocs <- generateDocs root firstOutline firstSources firstSolution
61- newDocs <- generateDocs root secondOutline secondSources secondSolution
60+ newDocs <- generateDocs root currentOutline currentSources currentSolution
61+ oldDocs <- generateDocs root publishedOutline publishedSources publishedSolution
6262 writeDiff oldDocs newDocs
6363
6464-- GENERATE DOCS
Original file line number Diff line number Diff line change @@ -44,23 +44,19 @@ validate (Flags root knownVersions (Command.ProjectInfo currentOutline currentSo
4444 Task. throw Exit. ValidateApplication
4545 (Outline. Pkg currentPkgOutline@ (Outline. PkgOutline _ _ _ _ _ _ _ _), Nothing ) ->
4646 do
47- _ <- verifyBuild root currentPkgOutline currentSources currentDeps
47+ _ <- buildProject root currentPkgOutline currentSources currentDeps
4848 Task. io $ putStrLn " Everything looks good!"
4949 (Outline. Pkg (Outline. PkgOutline _ _ _ _ _ _ _ _), Just (Command. ProjectInfo (Outline. App _) _ _)) ->
5050 error " Previous version is app"
5151 (Outline. Pkg currentPkgOutline@ (Outline. PkgOutline _ _ _ vsn _ _ _ _), Just (Command. ProjectInfo (Outline. Pkg previousOutline) previousSources previousDeps)) ->
5252 do
53- currentDocs <- verifyBuild root currentPkgOutline currentSources currentDeps
53+ currentDocs <- buildProject root currentPkgOutline currentSources currentDeps
5454 previousDocs <- buildProject root previousOutline previousSources previousDeps
5555
5656 _ <- Task. eio id $ verifyBump vsn currentDocs previousDocs knownVersions
5757
5858 Task. io $ putStrLn " Everything looks good!"
5959
60- verifyBuild :: FilePath -> Outline. PkgOutline -> Build. Sources -> Map Pkg. Name Details. Dependency -> Task. Task Exit. Validate Docs. Documentation
61- verifyBuild root outline sources solution =
62- buildProject root outline sources solution
63-
6460buildProject :: FilePath -> Outline. PkgOutline -> Build. Sources -> Map Pkg. Name Details. Dependency -> Task. Task Exit. Validate Docs. Documentation
6561buildProject root pkgOutline@ (Outline. PkgOutline _ _ _ _ _ _ _ _) sources solution =
6662 do
You can’t perform that action at this time.
0 commit comments