Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

install.sh fetches the AppImage by its real name (SculptForge-V-x86_64/aarch64.AppImage, #159); check_install_assets.py (test release_install_assets, release.sh release_ready) fails when an install script asks for an asset the release lacks

islandmed444bc7d709cc
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f1ae6aef..bb8f101c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -839,6 +839,10 @@ if(SCULPTFORGE_BUILD_TESTS)
# in GitHub Environments, no pull_request_target (tools/release/check_workflows.py; release.sh check runs it too).
add_test(NAME release_workflows COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/release/check_workflows.py)
add_test(NAME release_workflows_self_test COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/release/check_workflows.py --self-test)
+ # Every asset install/install.sh and install.ps1 download is one release.yml publishes (#159; release.sh checks
+ # the real release's asset list too).
+ add_test(NAME release_install_assets COMMAND ${Python3_EXECUTABLE} -I ${CMAKE_CURRENT_SOURCE_DIR}/tools/release/check_install_assets.py)
+ add_test(NAME release_install_assets_self_test COMMAND ${Python3_EXECUTABLE} -I ${CMAKE_CURRENT_SOURCE_DIR}/tools/release/check_install_assets.py --self-test)
add_test(NAME release_paperwork COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/release/paperwork_only.py --self-test)
# Build once, promote: only a maintainer's push run on staging is promotable (staged_run.py), and every package must
# match its recorded SHA-256 and attestation before publishing (verify_staged.py).
diff --git a/changes/fix-install-sh-appimage-159.md b/changes/fix-install-sh-appimage-159.md
new file mode 100644
index 00000000..607e8d9e
--- /dev/null
+++ b/changes/fix-install-sh-appimage-159.md
@@ -0,0 +1,12 @@
+---
+fixed: The one-line Linux installer (`curl -fsSL .../install/install.sh | sh`) downloads the AppImage again: it asked
+ for `SculptForge-X.Y.Z-linux-x86_64.AppImage` (and `linux-arm64`) while releases name it
+ `SculptForge-X.Y.Z-x86_64.AppImage` and `-aarch64.AppImage`, so it stopped with a 404. Checked against
+ SHA256SUMS.txt as before. A test and a release check now fail when an install script asks for an asset the
+ release doesn't have (#159, thanks @justblack1556).
+testers:
+ - Linux x86_64 (Arch or any distro): `curl -fsSL https://raw.githubusercontent.com/islandmed/SculptForge/main/install/install.sh | sh`;
+ it downloads SculptForge-X.Y.Z-x86_64.AppImage, verifies it and `sculptforge` starts.
+ - Linux arm64 (Asahi, Pi 5): the same command fetches the -aarch64.AppImage.
+---
+install/ is served from raw main: lane candidate, merge at once.
diff --git a/install/install.sh b/install/install.sh
index f64edba5..7b0c76d1 100755
--- a/install/install.sh
+++ b/install/install.sh
@@ -70,10 +70,10 @@ mkdir -p "$BIN"
if [ $OS = Linux ]; then
case $(uname -m) in
x86_64|amd64) ARCH=x86_64 ;;
- aarch64|arm64) ARCH=arm64 ;;
+ aarch64|arm64) ARCH=aarch64 ;;
*) die "no Linux build for $(uname -m) yet; see https://github.com/$REPO#building" ;;
esac
- APPIMAGE=SculptForge-$V-linux-$ARCH.AppImage
+ APPIMAGE=SculptForge-$V-$ARCH.AppImage # the AppImage way: x86_64 or aarch64, no "linux" (#159)
fetch "$APPIMAGE"
chmod +x "$TMP/$APPIMAGE"
(cd "$TMP" && "./$APPIMAGE" --appimage-extract >/dev/null) || die "could not unpack $APPIMAGE"
diff --git a/scripts/release.sh b/scripts/release.sh
index 2a996a53..90e10172 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -142,6 +142,10 @@ release_ready() {
if grep -q 'kUpdatePublicKeyHex = "[0-9a-f]\{64\}"' src/core/SelfUpdate.h 2>/dev/null; then
grep -qx SHA256SUMS.txt.sig "$work/assets" || die "release $T has no SHA256SUMS.txt.sig: apps can't update to it in one click" "check the UPDATE_SIGNING_KEY secret, then re-run the Release workflow: gh workflow run release.yml -R $REPO --ref $T -f tag=$T"
fi
+ # install/install.sh and install.ps1 (served from raw main) fetch from releases/latest: every name must be here (#159).
+ local out
+ out=$(python3 tools/release/check_install_assets.py --version "$V" --assets "$work/assets" 2>&1) ||
+ die "$out" "fix the asset names in install/ (site lane, merges at once) or re-run the Release workflow if an upload is missing"
}
# Downloads one release asset and checks it against SHA256SUMS.txt with a checksum computed here. Prints the sum.
asset_sha() {
diff --git a/tests/release_beta_test.sh b/tests/release_beta_test.sh
index 8cc97064..63cd8751 100755
--- a/tests/release_beta_test.sh
+++ b/tests/release_beta_test.sh
@@ -24,7 +24,7 @@ quiet() { "$@" >"$S/out.log" 2>&1 || { cat "$S/out.log" >&2; fail "$*"; }; }
git clone -q --shared --no-checkout "$ROOT" "$S/repo"
cd "$S/repo"
git sparse-checkout set --no-cone /.github/workflows/ /CMakeLists.txt /CHANGELOG.md /CITATION.cff /packaging/ /docs/ /tools/ /website/ \
- /scripts/ /changes/ /tests/ui/whats_new.sfui
+ /scripts/ /changes/ /install/ /tests/ui/whats_new.sfui
git checkout -q -B main "$(git -C "$ROOT" rev-parse HEAD)"
# This checkout's uncommitted changes (the tree being tested), then one commit on main.
paths=(.github/workflows CMakeLists.txt CHANGELOG.md packaging docs tools website scripts changes tests/ui/whats_new.sfui)
@@ -84,7 +84,10 @@ case "\$*" in
"run view"*"-q .status"*) echo completed ;;
"run view"*"-q .conclusion"*) echo success ;;
"repo view islandmed/sculptforge-insiders"*) echo "islandmed/sculptforge-insiders" ;;
- "release view"*) printf 'SHA256SUMS.txt\nSHA256SUMS.txt.sig\n' ;; # (signed: the app has an update key)
+ "release view"*) printf 'SHA256SUMS.txt\nSHA256SUMS.txt.sig\n' # (signed: the app has an update key)
+ # what install/install.sh and install.ps1 download (tools/release/check_install_assets.py)
+ for f in x86_64.AppImage aarch64.AppImage darwin-universal.dmg windows-x86_64.zip windows-x86_64.exe; do
+ echo "SculptForge-\${3#v}-\$f"; done ;;
"release download"*) exit 1 ;;
*homebrew-tap*) printf ' version "0.10.10"\n' | base64 ;;
"pr view 1800"*) echo "OPEN islandmed sculptforge-bump" ;;
diff --git a/tools/release/check_install_assets.py b/tools/release/check_install_assets.py
new file mode 100755
index 00000000..96f57176
--- /dev/null
+++ b/tools/release/check_install_assets.py
@@ -0,0 +1,87 @@
+#!/usr/bin/env python3
+# SculptForge - open source digital sculpting
+# SPDX-License-Identifier: GPL-3.0-or-later
+"""Every asset install/install.sh and install/install.ps1 download exists in the release (#159: install.sh asked for
+SculptForge-V-linux-arm64.AppImage while releases ship SculptForge-V-aarch64.AppImage). The scripts are served from
+raw main, so a wrong name breaks every curl | sh install at once.
+
+ check_install_assets.py ctest (release_install_assets): each name is one release.yml
+ copies into the release (its version-less copies step)
+ check_install_assets.py --version V --assets F scripts/release.sh: each name is in F (gh release view's asset list)
+ check_install_assets.py --self-test
+"""
+import argparse
+import re
+import sys
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parents[2]
+SUMS = "SHA256SUMS.txt"
+
+
+def install_names(sh: str, ps1: str) -> set[str]:
+ """The asset names both scripts fetch, with {V} for the version."""
+ names = {SUMS}
+ arches = re.findall(r"\)\s*ARCH=([\w.-]+)\s*;;", sh)
+ for t in re.findall(r"SculptForge-\$V-[\w$.-]+", sh):
+ t = t.replace("$V", "{V}")
+ names |= {t.replace("$ARCH", a) for a in arches} if "$ARCH" in t else {t}
+ names |= {t.replace("$v", "{V}") for t in re.findall(r'Get-Asset "(SculptForge-\$v-[\w.-]+)"', ps1)}
+ if any("$" in n for n in names):
+ raise SystemExit(f"check_install_assets: unexpanded variable in {sorted(n for n in names if '$' in n)}")
+ return names
+
+
+def release_names(yml: str) -> set[str]:
+ """The versioned names release.yml copies from (cp fails the release when one is missing), with {V}."""
+ return {t.replace("${V}", "{V}").replace("$V", "{V}") for t in re.findall(r'cp "([^"]*\$\{?V\}?[^"]*)"', yml)} | {SUMS}
+
+
+def missing(wanted: set[str], have: set[str], version: str = "{V}") -> list[str]:
+ return sorted(n.replace("{V}", version) for n in wanted if n.replace("{V}", version) not in have)
+
+
+def self_test() -> None:
+ sh = 'case x in\n x86_64) ARCH=x86_64 ;;\n arm64) ARCH=aarch64 ;;\nesac\nA=SculptForge-$V-$ARCH.AppImage\nD=SculptForge-$V-darwin-universal.dmg\n'
+ ps1 = 'Get-Asset "SculptForge-$v-windows-x86_64.zip"\nMove-Item "SculptForge-$v-windows-x86_64" d\n'
+ names = install_names(sh, ps1)
+ assert names == {SUMS, "SculptForge-{V}-x86_64.AppImage", "SculptForge-{V}-aarch64.AppImage",
+ "SculptForge-{V}-darwin-universal.dmg", "SculptForge-{V}-windows-x86_64.zip"}, names
+ have = {"SHA256SUMS.txt", "SculptForge-1.2.3-x86_64.AppImage", "SculptForge-1.2.3-aarch64.AppImage",
+ "SculptForge-1.2.3-darwin-universal.dmg", "SculptForge-1.2.3-windows-x86_64.zip"}
+ assert missing(names, have, "1.2.3") == []
+ old = install_names(sh.replace("ARCH=aarch64", "ARCH=arm64").replace("-$ARCH.", "-linux-$ARCH."), ps1)
+ assert missing(old, have, "1.2.3") == ["SculptForge-1.2.3-linux-arm64.AppImage",
+ "SculptForge-1.2.3-linux-x86_64.AppImage"], missing(old, have, "1.2.3")
+ yml = 'cp "SculptForge-$V-x86_64.AppImage" a\ncp "sculptforge_${V}_amd64.deb" b\n'
+ assert release_names(yml) == {SUMS, "SculptForge-{V}-x86_64.AppImage", "sculptforge_{V}_amd64.deb"}
+ print("check_install_assets self-test: ok")
+
+
+def main() -> int:
+ ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
+ ap.add_argument("--version", help="release version without the v, e.g. 1.2.3")
+ ap.add_argument("--assets", type=Path, help="file with one release asset name per line")
+ ap.add_argument("--self-test", action="store_true")
+ a = ap.parse_args()
+ if a.self_test:
+ self_test()
+ return 0
+ wanted = install_names((ROOT / "install/install.sh").read_text(), (ROOT / "install/install.ps1").read_text())
+ if a.assets:
+ if not a.version:
+ ap.error("--assets needs --version")
+ gone = missing(wanted, set(a.assets.read_text().split()), a.version)
+ where = f"release {a.version}"
+ else:
+ gone = missing(wanted, release_names((ROOT / ".github/workflows/release.yml").read_text()))
+ where = "release.yml's packages"
+ if gone:
+ print(f"install/install.sh or install.ps1 downloads assets not in {where}: {', '.join(gone)}", file=sys.stderr)
+ return 1
+ print(f"install scripts: {len(wanted)} asset names, all in {where}")
+ return 0
+
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/tools/test/impacted.py b/tools/test/impacted.py
index c02eb377..3c537e92 100644
--- a/tools/test/impacted.py
+++ b/tools/test/impacted.py
@@ -46,8 +46,10 @@ HAND_MAP = [
("tests/ui/whats_new.sfui", "release_pin_whats_new release_script_beta"),
("tests/release_beta_test.sh", "release_script_beta"),
("tools/release/*", "release_notes release_notes_fragments release_script_beta release_pin_whats_new release_workflows"
- " release_workflows_self_test release_paperwork release_staged_run release_verify_staged"),
- (".github/workflows/*", "release_workflows release_script_beta"),
+ " release_workflows_self_test release_paperwork release_staged_run release_verify_staged"
+ " release_install_assets release_install_assets_self_test"),
+ (".github/workflows/*", "release_workflows release_script_beta release_install_assets"),
+ ("install/*", "release_install_assets"),
("packaging/windows/*", "ui_windows_dpi_2560 ui_windows_dpi_2160 ui_ui_scale_900"),
("addons/blender/*", "blender_exchange blender_addon_package blender_addon"),
("integrations/maya/*", "maya_shelf_script ui_maya_bridge"),