Replace the fixed 4.7.1 Dockerfile/workflow pin with: - a nightly schedule that resolves the newest stable Godot (4.0+) and newest stable Blender, and builds+pushes <version> plus a floating latest tag only when the Godot version actually changed - a workflow_dispatch free-text version input to (re)build any specific Godot version on demand, always with newest-at-build-time Blender, overwriting that tag without touching latest - scripts/resolve-godot-version.sh and scripts/resolve-blender-url.sh, with shared parsing logic in scripts/lib.sh and an offline smoke test in scripts/test-lib.sh - Blender is now fetched directly from download.blender.org instead of apt (Ubuntu noble's apt package is stuck on 4.0.2) - drop the push-to-main trigger; schedule + workflow_dispatch only Scope is Godot 4.0+ only — .blend import is a Godot 4 feature, so 3.x builds have no use for the Blender toolchain this image adds. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
24 lines
1.1 KiB
Bash
24 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
# Shared parsing helpers for resolve-godot-version.sh and resolve-blender-url.sh.
|
|
# Kept separate from the network calls so the parsing logic can be unit-tested
|
|
# offline — see test-lib.sh.
|
|
|
|
# Reads a GitHub releases API response (JSON array) on stdin, prints the newest
|
|
# non-prerelease, non-draft tag with its "-stable" suffix stripped (e.g. "4.7.1").
|
|
parse_latest_godot_tag() {
|
|
jq -r '[.[] | select(.prerelease == false and .draft == false)][0].tag_name' | sed 's/-stable$//'
|
|
}
|
|
|
|
# Reads the download.blender.org/release/ index HTML on stdin, prints the newest
|
|
# "X.Y" minor-version directory name (no trailing slash), numerically not
|
|
# lexicographically (so "4.10" correctly beats "4.2").
|
|
parse_latest_blender_minor() {
|
|
grep -oE 'Blender[0-9]+\.[0-9]+/' | grep -oE '[0-9]+\.[0-9]+' | sort -t. -k1,1n -k2,2n -u | tail -1
|
|
}
|
|
|
|
# Reads a Blender minor-version release index HTML on stdin, prints the newest
|
|
# linux-x64 tarball filename (ignores windows/mac assets and .sha256 sidecars).
|
|
parse_latest_blender_tarball() {
|
|
grep -oE 'blender-[0-9.]+-linux-x64\.tar\.xz' | sort -V -u | tail -1
|
|
}
|