Skip to content

Commit

Permalink
Add shake dependencies targets
Browse files Browse the repository at this point in the history
  • Loading branch information
avh4 committed Sep 24, 2020
1 parent 6152590 commit 06d6d40
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Build release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: cabal-release-v1-${{ runner.os }}-${{ hashFiles('cabal.project.freeze') }}
- run: cabal v2-update
- run: cabal v2-build --only-dependencies
- run: ./build.sh -- dist-dependencies
- run: ./build.sh -- dist
- name: Sign artifacts
run: |
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ jobs:
# path: dist-newstyle
# key: dist-v1-${{ runner.os }}
- run: cabal v2-update
- run: cabal v2-build --only-dependencies
- run: cabal v2-build --only-dependencies --enable-tests
- run: ./build.sh -- dependencies
- run: ./build.sh -- build
- name: Tests
Expand Down
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ cache:

install:
- cabal v2-update
- cabal v2-build --only-dependencies
- cabal v2-build --only-dependencies --enable-tests
- ./build.sh -- dependencies


Expand Down
30 changes: 29 additions & 1 deletion Shakefile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ main = do
phony "dist" $ need [ "dist/elm-format-" ++ gitDescribe ++ "-" ++ show os <.> zipFormat ]

phony "dependencies" $ need
[ shellcheck
[ "_build/cabal-dependencies.ok"
, "_build/cabal-test-dependencies.ok"
, shellcheck
]
phony "dist-dependencies" $ need
[ "_build/cabal-dependencies.ok"
]

phony "clean" $ do
Expand Down Expand Up @@ -327,6 +332,29 @@ main = do
writeFile' out ""


--
-- dependencies
--

"_build/cabal-dependencies.ok" %> \out -> do
need
[ "elm-format.cabal"
, "cabal.project"
, "cabal.project.freeze"
]
cmd_ "cabal" [ "v2-build", "--only-dependencies" ]
writeFile' out ""

"_build/cabal-test-dependencies.ok" %> \out -> do
need
[ "elm-format.cabal"
, "cabal.project"
, "cabal.project.freeze"
]
cmd_ "cabal" [ "v2-build", "--only-dependencies", "--enable-tests" ]
writeFile' out ""


--
-- shellcheck
--
Expand Down

0 comments on commit 06d6d40

Please sign in to comment.