Files
vectorcraft/packaging/linux/nightly.sh
T
Dylan M. Taylor 8b0b808857 packaging(linux): support co-installable nightly packages (#9233)
Linux nightly packaging by @dylanmtaylor, with the per-app Nightly flavor commits stacked on his branch.

gate test shard 1/5 (and the Sonar scan that reads its coverage) fails on crates/ui-egui/src/doc_windows/tests.rs `a_document_made_current_in_presentation_mode_comes_to_the_front_after_it`, which main fails too (CI run 45581083304); this PR touches no ui-egui code.

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-25 06:01:37 -06:00

33 lines
1.7 KiB
Bash
Executable File

#!/usr/bin/env bash
# App-owned GUI-only nightly tar: no FUSE/AppImage, CLI, association or install hooks.
set -euo pipefail
ARCH=
while [[ $# -gt 0 ]]; do
case "$1" in
--arch) [[ $# -ge 2 ]] || { echo 'missing --arch value' >&2; exit 2; }; ARCH="$2"; shift 2 ;;
-h|--help) echo 'Usage: nightly.sh --arch x86_64'; exit 0 ;;
*) echo "unsupported nightly argument: $1" >&2; exit 2 ;;
esac
done
[[ "$ARCH" == x86_64 && "$(uname -s)" == Linux ]] || { echo 'only native Linux x86_64 nightly packaging is supported' >&2; exit 2; }
# shellcheck source=../nightly-common.sh
. "$(dirname "${BASH_SOURCE[0]}")/../nightly-common.sh"
nightly_init linux "$ARCH" x86_64-unknown-linux-gnu
OUTPUT="$DIST/vectorcraft-$VERSION-linux-x86_64-nightly.tar.gz"
[[ ! -e "$OUTPUT" && ! -L "$OUTPUT" ]] || nightly_die 'refusing to replace an existing nightly archive'
nightly_build_gui
STAGE="$NIGHTLY_WORK/stage"
mkdir -p "$STAGE"
# The standard Nightly layout: `<app>` is the launcher and `<app>-bin` the GUI it starts, so an
# unpacked tar is isolated like the packages and the shared smoke can query the entrypoint.
cp "$NIGHTLY_GUI" "$STAGE/vectorcraft-bin"
chmod 755 "$STAGE/vectorcraft-bin"
cp "$ROOT/packaging/linux/nightly-launch.sh" "$STAGE/vectorcraft"
chmod 755 "$STAGE/vectorcraft"
# The Nightly art, not stable's: with both channels open the two tars must not share an icon.
cp "$ROOT/assets/app-icon/vectorcraft-nightly.png" "$STAGE/vectorcraft.png"
nightly_copy_notices "$STAGE"
# The private mktemp cwd is the helper authority root, not a CLI path parent.
(cd "$NIGHTLY_WORK" && python3 "$ROOT/packaging/nightly-archive.py" linux stage archive.tar.gz)
nightly_publish_archive "$NIGHTLY_WORK/archive.tar.gz" "$OUTPUT"