Skip to content
Snippets Groups Projects
Commit 6eb1b66b authored by Emanuel Borsboom's avatar Emanuel Borsboom
Browse files

Merge branch 'stable'

parents 06cda686 cd5d3440
No related branches found
No related tags found
No related merge requests found
......@@ -199,12 +199,12 @@ rules global@Global{..} args = do
c
-- 'stack.cabal' is autogenerated by 'stack', delete to ensure not stale
_ <- liftIO $ tryJust (guard . isDoesNotExistError) (removeFile "stack.cabal")
() <- cmd0 "install" gBuildArgs $ concat $ concat
[["--pedantic --no-haddock-deps --flag stack:integration-tests"]
() <- cmd0 "install" gBuildArgs integrationTestFlagArgs $ concat $ concat
[["--pedantic --no-haddock-deps "]
,[" --haddock" | gTestHaddocks]
,[" stack"]]
let cmd' c = cmd (AddPath [tmpDir] []) stackProgName (stackArgs global) c
() <- cmd' "test" gBuildArgs "--pedantic --flag stack:integration-tests --exec stack-integration-test stack"
() <- cmd' "test" gBuildArgs integrationTestFlagArgs "--pedantic --exec stack-integration-test stack"
return ()
copyFileChanged (releaseBinDir </> binaryName </> stackExeFileName) out
......@@ -300,13 +300,21 @@ rules global@Global{..} args = do
["--local-bin-path=" ++ takeDirectory out]
"install"
gBuildArgs
integrationTestFlagArgs
"--pedantic"
"--flag stack:integration-tests"
"stack")
(tryJust (guard . isDoesNotExistError) (removeFile out))
where
integrationTestFlagArgs =
-- Explicitly enabling 'hide-dependency-versions' and 'supported-build' to work around
-- https://github.com/commercialhaskell/stack/issues/4960
[ "--flag=stack:integration-tests"
, "--flag=stack:hide-dependency-versions"
, "--flag=stack:supported-build"
]
getBinaryPkgStageFiles = do
docFiles <- getDocFiles
let stageFiles = concat
......@@ -339,7 +347,8 @@ rules global@Global{..} args = do
_ -> [binaryExeFileName, binaryPkgTarGzFileName]
binaryPkgZipFileName = binaryName <.> zipExt
binaryPkgTarGzFileName = binaryName <.> tarGzExt
binaryExeFileName = binaryName <.> binaryExt
-- Adding '-bin' to name to work around https://github.com/commercialhaskell/stack/issues/4961
binaryExeFileName = binaryName ++ "-bin" <.> exe
binaryName =
concat
[ stackProgName
......@@ -359,10 +368,6 @@ rules global@Global{..} args = do
ascExt = ".asc"
sha256Ext = ".sha256"
uploadExt = ".upload"
binaryExt =
case platformOS of
Windows -> ".exe"
_ -> ".bin"
-- | Upload file to Github release.
uploadToGithubRelease :: Global -> FilePath -> Maybe String -> Action ()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment