Windows: a hand-written NSIS script (per user, no administrator prompt, installs under the profile's Programs folder; one program file; a Start Menu entry named Wanderbooks with the icon; an uninstaller listed in Settings > Apps that removes only what the installer put in its own folder and never names the data folder). The installer asks the person to quit the app fully before it replaces or removes the program. An optional Authenticode signing step runs only when its secrets exist. macOS: the .app is assembled by a script (Info.plist with the bundle identifier, version, name, Documents-folder purpose string; the one program at Contents/MacOS/wanderbooks; the licences), signed with the hardened runtime and an empty entitlements file that says why, put in a dmg with an Applications shortcut, notarized and stapled when the owner's Apple identity is given and skipped with a notice when not. The program is one universal binary (lipo of the two release builds). Linux: both desktop entries name the window's app id and the icon; the rpm now installs the icon; the deb, the pacman tarball and the rpm all carry LICENSE-MIT and LICENSE-APACHE beside the notices. One version: deploy/packaging/version.sh reads crates/ledger-cli's Cargo.toml; every script takes it from there. Tests read the scripts and build a bundle with a stand-in program. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
22 lines
951 B
Bash
Executable File
22 lines
951 B
Bash
Executable File
#!/bin/sh
|
|
# The program's version: the one place it is written is `version = "..."`
|
|
# in crates/ledger-cli/Cargo.toml (plan P15 C1, WB-pkg-6). Every package, the
|
|
# release workflow and the installer take it from here; the program itself
|
|
# reports the same file's version through `CARGO_PKG_VERSION`.
|
|
#
|
|
# deploy/packaging/version.sh prints 0.1.0
|
|
#
|
|
# A version that is not three plain numbers is refused: the Windows
|
|
# installer's file-version fields and the macOS bundle's both need them.
|
|
set -eu
|
|
here=$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)
|
|
version=$(sed -n 's/^version = "\(.*\)"/\1/p' "$here/../../crates/ledger-cli/Cargo.toml" | head -n1)
|
|
case "$version" in
|
|
[0-9]*.[0-9]*.[0-9]*) ;;
|
|
*) echo "version.sh: no x.y.z version in crates/ledger-cli/Cargo.toml (found: '$version')" >&2; exit 1 ;;
|
|
esac
|
|
case "$version" in
|
|
*[!0-9.]*) echo "version.sh: '$version' is not three plain numbers" >&2; exit 1 ;;
|
|
esac
|
|
printf '%s\n' "$version"
|