- install.sh: no-root user-local install (private venv + ~/.local/bin launchers + desktop entry); --ref <tag> to install a specific release, --uninstall to remove; auto-installs the python3-venv prerequisite with consent - packaging/make-run.sh: build a self-extracting .run installer (makeself) bundling the wheel + install.sh; release workflow builds and attaches it - M13 self-update apply: `rigdoctor update` runs an authenticated pip upgrade (rigdoctor[gui] @ git+https://oauth2:<token>@...@<tag>), token scrubbed; GUI sidebar "Update to v…" button applies it and prompts to restart - version 0.0.7, CHANGELOG, docs (M9/M13, ROADMAP, README install section) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env sh
|
||||
# Build a self-extracting .run installer: bundles the wheel + install.sh so a user
|
||||
# can download one file, run it, and get a no-root user-local install.
|
||||
#
|
||||
# Requires `makeself` (apt install makeself). Run from the repo root.
|
||||
set -eu
|
||||
|
||||
ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
||||
cd "$ROOT"
|
||||
|
||||
command -v makeself >/dev/null 2>&1 || {
|
||||
echo "makeself not found. Install it: sudo apt install makeself"
|
||||
exit 1
|
||||
}
|
||||
|
||||
VERSION=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
|
||||
mkdir -p dist
|
||||
|
||||
# Build the wheel if it isn't already in dist/.
|
||||
if ! ls dist/rigdoctor-"$VERSION"-py3-none-any.whl >/dev/null 2>&1; then
|
||||
python3 -m build --wheel
|
||||
fi
|
||||
|
||||
STAGE=$(mktemp -d)
|
||||
cp dist/rigdoctor-"$VERSION"-py3-none-any.whl "$STAGE"/
|
||||
cp install.sh "$STAGE"/install.sh
|
||||
chmod +x "$STAGE/install.sh"
|
||||
|
||||
OUT="dist/rigdoctor-$VERSION-installer.run"
|
||||
makeself --notemp-suffix "$STAGE" "$OUT" "RigDoctor $VERSION installer" ./install.sh
|
||||
rm -rf "$STAGE"
|
||||
echo "Built $OUT"
|
||||
echo "Run it with: chmod +x $OUT && ./$OUT"
|
||||
Reference in New Issue
Block a user