Commit 9bc62d49 authored by Valentin Reis's avatar Valentin Reis

more code moved into shakebuild

parent 832d1e59
Pipeline #6180 passed with stages
in 1 minute and 4 seconds
......@@ -10,6 +10,7 @@ import Development.Shake
import Protolude
import Development.Shake.FilePath
import Control.Monad
import System.Process.Typed
refactCommands =
[ "OrganizeImports Argo.Stack"
......@@ -18,29 +19,32 @@ refactCommands =
, "OrganizeImports Argo.Types"
]
main = shakeArgs shakeOptions $ do
phony "clean" $ removeFilesAfter "." ["README.md"]
main = getArgs >>= deal
where
deal args
| "ghcid" `elem` args = void $ startProcess $ proc
"ghcid"
[ "--command"
, "cabal new-repl "
<> " --ghc-options=-fno-code"
<> " --ghc-options=-fno-break-on-exception"
<> " --ghc-options=-fno-break-on-error"
<> " --ghc-options=-v1 --ghc-options=-ferror-spans"
, "--restart"
, "argonix.cabal"
, "--restart"
, "default.nix"
, "--restart"
, "shell.nix"
]
| otherwise = runshake
phony "ghcid"
$ cmd_ Shell
$ "while true; do "
<> "nix-shell "
<> "--run 'ghcid "
<> "--command \"cabal repl --ghc-options=-fno-code "
<> "--ghc-options=-fno-break-on-exception "
<> "--ghc-options=-fno-break-on-error "
<> "--ghc-options=-v1 --ghc-options=-ferror-spans "
<> "--ghc-options=-j\" "
<> "--restart=argotk.cabal "
<> "--restart=default.nix"
<> "--restart=shell.nix'"
<> "; done"
runshake = shakeArgs shakeOptions $ do
phony "clean" $ removeFilesAfter "." ["README.md"]
phony "ht-refact" htRefactAll
phony "brittany" brittany
phony "codequality" $ htRefactAll >> brittany
phony "brittany" brittany
phony "codequality" $ htRefactAll >> brittany
want ["README.md"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment