mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
The first macOS run died after 88 seconds on `cd scripts/monero_c: No such file
or directory`. That was the cheap failure. The workflow had been written fresh
rather than ported, and behind that missing clone it had also skipped the step
that pins the crypto salts. Had it got further it would have shipped a build
that mints random salts, which is the 2026-08-29 corrupted-seeds incident on a
new platform: wallets created on it would not decrypt after the next upgrade.
So the prerequisites are now ported step for step from build-linux.yml, the
desktop build known to pass: torch_dart, reown_flutter, bitbox (the Apple
variant, without the gomobile Android bindings), prepare_moneroc.sh, configure,
secrets generation, salt pinning with the same refusal, Trocador injection,
codegen, localization, and compile_graphics.sh. curl for wget and BSD sed's
-i.bak form, because the runner is a Mac.
Two more things the fresh version got wrong, found while porting:
configure was run without sourcing app_env.sh, and app_config.sh writes
CFBundleName, the bundle id and the version into Info.plist from variables only
app_env.sh sets. The app would have shipped with an empty name. The step now
prints the three values it wrote.
And app_env.sh hardcoded 1.0.0 (1) on macOS, 6.1.0 (79) on Linux and 1.9.0 (29)
in the fish variant, the last two being Cake Wallet's own version numbers. On
macOS PlistBuddy writes that into the bundle, so every macOS build would have
called itself 1.0.0. Linux only escaped because its substitution looks for a
version: 0.0.0 placeholder that pubspec_description.yaml does not contain. All
three now derive from pubspec_description.yaml the way Android already does, and
the two sh variants resolve to 1.0.4 (14). The fish one is unverified: fish is
not installed here and CI does not use it.
Separately, four workflows verified their secret injection by grepping
lib/.secrets.g.dart into the log, which prints the values. Android's printed the
Trocador, WalletConnect, MoonPay and exchange-helper keys. Gitea likely masks
registered secrets, but masking is a best-effort layer and values never belong
in output. Each now reports every key's name and length and nothing else.
Windows is not in this commit. Its run refused correctly, on the guard added in
c11c79b0c: the runner has Flutter 3.38.5, not the pinned 3.32.0. That is fixed on
the runner, not in the workflow.
41 lines
1.1 KiB
Bash
Executable File
41 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
APP_LINUX_NAME=""
|
|
APP_LINUX_VERSION=""
|
|
APP_LINUX_BUILD_VERSION=""
|
|
|
|
CAKEWALLET="cakewallet"
|
|
|
|
TYPES=($CAKEWALLET)
|
|
APP_LINUX_TYPE=$CAKEWALLET
|
|
|
|
if [ -n "$1" ]; then
|
|
APP_LINUX_TYPE=$1
|
|
fi
|
|
|
|
# Version and build come from pubspec_description.yaml, the one file every
|
|
# platform reads. These said 6.1.0 (79), Cake Wallet's own numbers, which only
|
|
# never reached a binary because app_config.sh's substitution looks for a
|
|
# version: 0.0.0 placeholder that pubspec_description.yaml does not contain.
|
|
_PUBSPEC_VERSION=$(awk -F': ' '/^version:/ {print $2; exit}' "$(dirname "${BASH_SOURCE[0]:-$0}")/../../pubspec_description.yaml")
|
|
CAKEWALLET_NAME="Hash Bags"
|
|
CAKEWALLET_VERSION="${_PUBSPEC_VERSION%+*}"
|
|
CAKEWALLET_BUILD_NUMBER="${_PUBSPEC_VERSION#*+}"
|
|
|
|
if ! [[ " ${TYPES[*]} " =~ " ${APP_LINUX_TYPE} " ]]; then
|
|
echo "Wrong app type."
|
|
exit 1
|
|
fi
|
|
|
|
case $APP_LINUX_TYPE in
|
|
$CAKEWALLET)
|
|
APP_LINUX_NAME=$CAKEWALLET_NAME
|
|
APP_LINUX_VERSION=$CAKEWALLET_VERSION
|
|
APP_LINUX_BUILD_NUMBER=$CAKEWALLET_BUILD_NUMBER;;
|
|
esac
|
|
|
|
export APP_LINUX_TYPE
|
|
export APP_LINUX_NAME
|
|
export APP_LINUX_VERSION
|
|
export APP_LINUX_BUILD_NUMBER
|