Skip to content

Commit

Permalink
Re #6531 Distinguish target OS from platform OS
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilgrem committed Mar 26, 2024
1 parent ad11d0f commit 7ff1297
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions etc/scripts/release.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ main = shakeArgsWith
let gAllowDirty = False
Platform arch _ = buildPlatform
gArch = arch
gTargetOS = platformOS
gBinarySuffix = ""
gTestHaddocks = True
gProjectRoot = "" -- Set to real value below.
Expand All @@ -88,6 +89,7 @@ main = shakeArgsWith
, gProjectRoot
, gHomeDir
, gArch
, gTargetOS
, gBinarySuffix
, gTestHaddocks
, gBuildArgs
Expand Down Expand Up @@ -140,6 +142,7 @@ options =
, "--system-ghc"
, "--no-install-ghc"
]
, gTargetOS = Linux
}
)
"Build a statically-linked binary using an Alpine Linux Docker image."
Expand Down Expand Up @@ -355,7 +358,7 @@ rules global args = do
releaseBinDir = releaseDir </> "bin"

binaryPkgFileNames =
case platformOS of
case global.gTargetOS of
Windows ->
[ binaryExeFileName
, binaryPkgZipFileName
Expand All @@ -376,7 +379,7 @@ rules global args = do
, "-"
, stackVersionStr global
, "-"
, display platformOS
, display global.gTargetOS
, "-"
, display global.gArch
, if null global.gBinarySuffix then "" else "-" ++ global.gBinarySuffix
Expand Down Expand Up @@ -492,6 +495,7 @@ data Global = Global
, gProjectRoot :: !FilePath
, gHomeDir :: !FilePath
, gArch :: !Arch
, gTargetOS :: !OS
, gBinarySuffix :: !String
, gTestHaddocks :: !Bool
, gBuildArgs :: [String]
Expand Down

0 comments on commit 7ff1297

Please sign in to comment.