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 _ _
71
71
suggestVersion :: Flags -> Outline. PkgOutline -> Outline. PkgOutline -> Task. Task Exit. Bump ()
72
72
suggestVersion flags@ (Flags _ root _ (Command. ProjectInfo _ currentSources currentDeps) (Command. ProjectInfo _ publishedSources publishedDeps)) currentOutline@ (Outline. PkgOutline _ _ _ vsn _ _ _ _) publishedOutline =
73
73
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
76
76
let changes = Diff. diff oldDocs newDocs
77
77
let newVersion = Diff. bump changes vsn
78
78
Task. io $
Original file line number Diff line number Diff line change @@ -41,11 +41,11 @@ data Flags = Flags
41
41
deriving (Show )
42
42
43
43
run :: Flags -> IO ()
44
- run flags@ (Flags _ _ firstPackage secondPackage ) =
44
+ run flags@ (Flags _ _ currentPackage publishedPackage ) =
45
45
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 )
49
49
_ ->
50
50
error " Received outlines are in the wrong format"
51
51
@@ -55,10 +55,10 @@ type Task a =
55
55
Task. Task Exit. Diff a
56
56
57
57
diff :: 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 =
59
59
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
62
62
writeDiff oldDocs newDocs
63
63
64
64
-- GENERATE DOCS
Original file line number Diff line number Diff line change @@ -44,23 +44,19 @@ validate (Flags root knownVersions (Command.ProjectInfo currentOutline currentSo
44
44
Task. throw Exit. ValidateApplication
45
45
(Outline. Pkg currentPkgOutline@ (Outline. PkgOutline _ _ _ _ _ _ _ _), Nothing ) ->
46
46
do
47
- _ <- verifyBuild root currentPkgOutline currentSources currentDeps
47
+ _ <- buildProject root currentPkgOutline currentSources currentDeps
48
48
Task. io $ putStrLn " Everything looks good!"
49
49
(Outline. Pkg (Outline. PkgOutline _ _ _ _ _ _ _ _), Just (Command. ProjectInfo (Outline. App _) _ _)) ->
50
50
error " Previous version is app"
51
51
(Outline. Pkg currentPkgOutline@ (Outline. PkgOutline _ _ _ vsn _ _ _ _), Just (Command. ProjectInfo (Outline. Pkg previousOutline) previousSources previousDeps)) ->
52
52
do
53
- currentDocs <- verifyBuild root currentPkgOutline currentSources currentDeps
53
+ currentDocs <- buildProject root currentPkgOutline currentSources currentDeps
54
54
previousDocs <- buildProject root previousOutline previousSources previousDeps
55
55
56
56
_ <- Task. eio id $ verifyBump vsn currentDocs previousDocs knownVersions
57
57
58
58
Task. io $ putStrLn " Everything looks good!"
59
59
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
-
64
60
buildProject :: FilePath -> Outline. PkgOutline -> Build. Sources -> Map Pkg. Name Details. Dependency -> Task. Task Exit. Validate Docs. Documentation
65
61
buildProject root pkgOutline@ (Outline. PkgOutline _ _ _ _ _ _ _ _) sources solution =
66
62
do
You can’t perform that action at this time.
0 commit comments