mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-26 04:21:30 +01:00
Linux nightly packaging by @dylanmtaylor, with the per-app Nightly flavor commits stacked on his branch. SonarCloud coverage shard fails on pre-existing teardown crashes that also fail on main (tests::scan_probes::a_browse_through_a_link_and_dot_dot_reads_the_folder_the_system_names and tests::lifecycle_037::a_widget_gesture_cancels_if_its_target_moves_between_resolution_and_the_press, the GPU warm-up thread at process exit), fixed by #4697; reported to the LightCraft owner. Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
33 lines
1.7 KiB
Bash
Executable File
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
|
|
# The launcher lives beside this script. The sourced helpers define ROOT, not HERE, and an inherited
|
|
# HERE would install some other script as the launcher.
|
|
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
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/lightcraft-$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 GUI is `lightcraft-bin`; `lightcraft` is the launcher, so an unpacked tar starts in the
|
|
# Nightly profile instead of the stable settings folder.
|
|
install -m755 "$NIGHTLY_GUI" "$STAGE/lightcraft-bin"
|
|
install -m755 "$HERE/nightly-tar-launch.sh" "$STAGE/lightcraft"
|
|
install -m644 "$ROOT/assets/app-icon/lightcraft-nightly.png" "$STAGE/lightcraft-nightly.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"
|