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.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
Release test: the public gallery check reads this tree, not GitHub's API (an unauthenticated call from a shared CI runner hit the rate limit: release_script_beta failed with an empty reason); the check uses GH_TOKEN when set and says when it can't read the gallery
islandmeddc6c7eef6956
diff --git a/scripts/release.sh b/scripts/release.shindex d9db4bcd..11fd7bbf 100755--- a/scripts/release.sh+++ b/scripts/release.sh@@ -288,7 +288,7 @@ preflight() {auth=$(gh auth status 2>&1 || true)grep -q "account $AUTHOR_NAME" <<<"$auth" || die "gh is not logged in as $AUTHOR_NAME" "gh auth login (or gh auth switch -u $AUTHOR_NAME)"words_ok "$mode"- python3 tools/brush-gallery/check_published.py >/dev/null 2>&1 || die "the public gallery (islandmed/sculptforge-brushes) differs from tools/brush-gallery/repo: $(python3 tools/brush-gallery/check_published.py 2>/dev/null | head -3)" "copy tools/brush-gallery/repo into a clone of it, commit, push its main"+ python3 tools/brush-gallery/check_published.py >/dev/null 2>&1 || die "the public gallery (islandmed/sculptforge-brushes) check failed: $(python3 tools/brush-gallery/check_published.py 2>/dev/null | head -3)" "copy tools/brush-gallery/repo into a clone of it, commit, push its main"grep -q '^set(SCULPTFORGE_PRERELEASE "[a-z0-9.]*")$' CMakeLists.txt ||die "CMakeLists.txt lost its set(SCULPTFORGE_PRERELEASE \"\") line that step bump sets" "restore it under project() (git log -p CMakeLists.txt), commit"python3 -c 'import json, sys; json.load(open(sys.argv[1]))' website/latest.json 2>/dev/null || die "website/latest.json is not valid JSON" "fix it, commit"diff --git a/tests/release_beta_test.sh b/tests/release_beta_test.shindex 07aaddda..08634531 100755--- a/tests/release_beta_test.sh+++ b/tests/release_beta_test.sh@@ -103,7 +103,10 @@ EOFprintf '#!/bin/sh\nexit 0\n' > "$S/bin/cmake"printf '#!/bin/sh\nexit 0\n' > "$S/bin/ctest"chmod +x "$S/bin/"*-export PATH="$S/bin:$PATH" HOME="$S/home" BUILD_DIR="$S/build" YES=1+# The public gallery as published (no GitHub API call: shared CI runners hit its rate limit): this tree's own files.+python3 -c 'import json, sys; sys.path.insert(0, sys.argv[1]); import check_published as c; print(json.dumps(c.local_tree()))' \+ "$ROOT/tools/brush-gallery" > "$S/gallery.json"+export PATH="$S/bin:$PATH" HOME="$S/home" BUILD_DIR="$S/build" YES=1 SF_GALLERY_PUBLIC="$S/gallery.json"unset HIGHLIGHTSbefore() { git show "$1:$2"; }diff --git a/tools/brush-gallery/check_published.py b/tools/brush-gallery/check_published.pyindex 5ffad199..46c2b98e 100644--- a/tools/brush-gallery/check_published.py+++ b/tools/brush-gallery/check_published.py@@ -14,6 +14,7 @@ Standard library only.import hashlibimport json+import osimport sysimport urllib.requestfrom pathlib import Path@@ -34,8 +35,15 @@ def local_tree():def public_tree():+ # SF_GALLERY_PUBLIC=<file>: the public tree from a JSON file of {path: blob sha} (the release test's sandbox,+ # which mustn't depend on GitHub's API: an unauthenticated call from a shared CI runner hits its rate limit).+ if os.environ.get("SF_GALLERY_PUBLIC"):+ return json.loads(Path(os.environ["SF_GALLERY_PUBLIC"]).read_text())url = f"https://api.github.com/repos/{PUBLIC}/git/trees/main?recursive=1"- with urllib.request.urlopen(urllib.request.Request(url, headers={"Accept": "application/vnd.github+json"}), timeout=30) as r:+ headers = {"Accept": "application/vnd.github+json"}+ if token := os.environ.get("GH_TOKEN") or os.environ.get("GITHUB_TOKEN"):+ headers["Authorization"] = f"Bearer {token}"+ with urllib.request.urlopen(urllib.request.Request(url, headers=headers), timeout=30) as r:tree = json.load(r)["tree"]return {t["path"]: t["sha"] for t in tree if t["type"] == "blob"}@@ -67,7 +75,12 @@ def main(argv):assert not marks(check_marks.load_marks())print("check_published self-test ok")return 0- problems = marks(check_marks.load_marks()) + differences(local_tree(), public_tree())+ try:+ public = public_tree()+ except (OSError, ValueError, KeyError) as e: # (urllib's errors are OSErrors)+ print(f"can't read {PUBLIC}'s files: {e}")+ return 2+ problems = marks(check_marks.load_marks()) + differences(local_tree(), public)for p in problems:print(p)if problems: