Skip to content

Commit 93b026d

Browse files
committed
Add OS+architecture tuple to installer file names
Having the same name for both Intel and Silicon macOS is problematic during release. Also, it’s possible we’ll have `aarch64-linux` in the future. /cc @danielmain
1 parent da083a3 commit 93b026d

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Fixes
66

7+
- Added OS-architecture tuple to installer file names to help with releases ([PR 3016](https://github.com/input-output-hk/daedalus/pull/3016))
78
- Fixed downloaded installer being left in Downloads after latest update installs ([PR 2941](https://github.com/input-output-hk/daedalus/pull/2941))
89
- Fixed incorrect amount of token sent ([PR 2962](https://github.com/input-output-hk/daedalus/pull/2962))
910

default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ let
306306
signed-windows-installer = let
307307
backend_version = self.daedalus-bridge.wallet-version;
308308
frontend_version = (builtins.fromJSON (builtins.readFile ./package.json)).version;
309-
fullName = "daedalus-${frontend_version}-${cluster}${buildNumSuffix}.exe"; # must match to packageFileName in make-installer
309+
fullName = "daedalus-${frontend_version}-${cluster}${buildNumSuffix}-x86_64-windows.exe"; # must match to packageFileName in make-installer
310310
in pkgs.runCommand "signed-windows-installer-${cluster}" {} ''
311311
mkdir $out
312312
cp -v ${self.signFile "${self.unsigned-windows-installer}/${fullName}"} $out/${fullName}
@@ -423,7 +423,7 @@ let
423423
version = (builtins.fromJSON (builtins.readFile ./package.json)).version;
424424
backend = "cardano-wallet-${nodeImplementation}";
425425
suffix = if buildNum == null then "" else "-${toString buildNum}";
426-
fn = "daedalus-${version}-${self.linuxClusterBinName}${suffix}.bin";
426+
fn = "daedalus-${version}-${self.linuxClusterBinName}${suffix}-x86_64-linux.bin";
427427
in pkgs.runCommand fn {} ''
428428
mkdir -p $out
429429
cp ${self.newBundle} $out/${fn}

installers/common/Types.hs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import Turtle (pwd, cd)
4242
import Turtle.Format (format, fp)
4343
import Data.Aeson (FromJSON(..), withObject, eitherDecode, (.:), genericParseJSON, defaultOptions)
4444
import qualified Data.ByteString.Lazy.Char8 as L8
45+
import qualified System.Info
4546

4647
data OS
4748
= Linux64
@@ -113,7 +114,7 @@ packageFileName :: OS -> Cluster -> Version -> Backend -> Text -> Maybe BuildJob
113114
packageFileName _os cluster ver backend _backendVer build = fromText name <.> ext
114115
where
115116
name = T.intercalate "-" parts
116-
parts = ["daedalus", fromVer ver, lshowText cluster] ++ build'
117+
parts = ["daedalus", fromVer ver, lshowText cluster] ++ build' ++ [archOS]
117118
_backend' = case backend of
118119
Cardano _ -> "cardano-wallet"
119120
ext = case _os of
@@ -124,6 +125,13 @@ packageFileName _os cluster ver backend _backendVer build = fromText name <.> ex
124125
Win64 -> "windows"
125126
Macos64 -> "macos"
126127
Linux64 -> "linux"
128+
archOS = case _os of
129+
Win64 -> "x86_64-windows"
130+
Macos64 ->
131+
if System.Info.arch == "aarch64"
132+
then "aarch64-darwin"
133+
else "x86_64-darwin"
134+
Linux64 -> "x86_64-linux"
127135
build' = maybe [] (\b -> [fromBuildJob b]) build
128136

129137
instance FromJSON Version where

0 commit comments

Comments
 (0)