unify stack build and stack install

For some reason, when stack install is run separately, it seems to be
installing a previous build from a different temp dir. WTF?
This commit is contained in:
Joey Hess 2017-10-26 10:10:02 -04:00
parent c6fcbaf5b5
commit 50c0fb7336
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 5 additions and 5 deletions

View file

@ -8,9 +8,9 @@
- The user needs to install git separately, and the installer checks - The user needs to install git separately, and the installer checks
- for that. - for that.
- -
- To build the installer, git-annex should already be built using - To build the installer, git-annex should already be built to
- stack and the necessary utility programs (rsync and wget) already - ./git-annex.exe and the necessary utility programs (rsync and wget)
- installed in PATH from msys32. - already installed in PATH from msys32.
- -
- Copyright 2013-2015 Joey Hess <id@joeyh.name> - Copyright 2013-2015 Joey Hess <id@joeyh.name>
- -
@ -40,7 +40,6 @@ import Build.BundledPrograms
main = do main = do
withTmpDir "nsis-build" $ \tmpdir -> do withTmpDir "nsis-build" $ \tmpdir -> do
let gitannex = tmpdir </> gitannexprogram let gitannex = tmpdir </> gitannexprogram
mustSucceed "stack" [Param "--local-bin-path", File ".", Param "install"]
mustSucceed "ln" [File "git-annex.exe", File gitannex] mustSucceed "ln" [File "git-annex.exe", File gitannex]
let license = tmpdir </> licensefile let license = tmpdir </> licensefile
mustSucceed "sh" [Param "-c", Param $ "zcat standalone/licences.gz > '" ++ license ++ "'"] mustSucceed "sh" [Param "-c", Param $ "zcat standalone/licences.gz > '" ++ license ++ "'"]

View file

@ -58,7 +58,8 @@ getextra rsync.exe 85cb7a4d16d274fcf8069b39042965ad26abd6aa
# Build git-annex # Build git-annex
stack setup --stack-yaml stack-windows.yaml stack setup --stack-yaml stack-windows.yaml
stack build -j 1 --stack-yaml stack-windows.yaml --no-haddock stack install -j 1 --stack-yaml stack-windows.yaml --no-haddock \
--local-bin-path .
# Build the installer # Build the installer
withcygpreferred stack ghc --stack-yaml stack-windows.yaml --no-haddock \ withcygpreferred stack ghc --stack-yaml stack-windows.yaml --no-haddock \