added auto update with hobbes
This commit is contained in:
parent
93efa73991
commit
266b982038
4 changed files with 34 additions and 0 deletions
16
auto-update
Executable file
16
auto-update
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
relaunchCompilation() {
|
||||||
|
while read line; do
|
||||||
|
if (( $( print -- $line | grep '.cabal-sandbox' | wc -l) == 0 )); then
|
||||||
|
print "$line"
|
||||||
|
cabal install
|
||||||
|
./.cabal-sandbox/bin/test-holy-project
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# launch a cabal install and cabal test after each
|
||||||
|
# small haskell file modification
|
||||||
|
{hobbes "*.hs" | relaunchCompilation } &
|
||||||
|
hobbes "*.cabal" | relaunchCompilation
|
|
@ -16,6 +16,7 @@ build-type: Simple
|
||||||
-- extra-source-files:
|
-- extra-source-files:
|
||||||
data-files: scaffold/LICENSE
|
data-files: scaffold/LICENSE
|
||||||
, scaffold/Setup.hs
|
, scaffold/Setup.hs
|
||||||
|
, scaffold/auto-update
|
||||||
, scaffold/gitignore
|
, scaffold/gitignore
|
||||||
, scaffold/project.cabal
|
, scaffold/project.cabal
|
||||||
, scaffold/src/Main.hs
|
, scaffold/src/Main.hs
|
||||||
|
|
16
scaffold/auto-update
Executable file
16
scaffold/auto-update
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
relaunchCompilation() {
|
||||||
|
while read line; do
|
||||||
|
if (( $( print -- $line | grep '.cabal-sandbox' | wc -l) == 0 )); then
|
||||||
|
print "$line"
|
||||||
|
cabal install
|
||||||
|
./.cabal-sandbox/bin/test-{{projectName}}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# launch a cabal install and cabal test after each
|
||||||
|
# small haskell file modification
|
||||||
|
{hobbes "*.hs" | relaunchCompilation } &
|
||||||
|
hobbes "*.cabal" | relaunchCompilation
|
|
@ -170,6 +170,7 @@ createProject p = do
|
||||||
createDirectory (projectName p)
|
createDirectory (projectName p)
|
||||||
setCurrentDirectory (projectName p)
|
setCurrentDirectory (projectName p)
|
||||||
genFile context "gitignore" $ ".gitignore"
|
genFile context "gitignore" $ ".gitignore"
|
||||||
|
genFile context "auto-update" $ "auto-update"
|
||||||
genFile context "LICENSE" $ "LICENSE"
|
genFile context "LICENSE" $ "LICENSE"
|
||||||
genFile context "Setup.hs" $ "Setup.hs"
|
genFile context "Setup.hs" $ "Setup.hs"
|
||||||
genFile context "project.cabal" $ (projectName p) ++ ".cabal"
|
genFile context "project.cabal" $ (projectName p) ++ ".cabal"
|
||||||
|
|
Loading…
Reference in a new issue