Fetching latest release version when building images so they are named correctly.
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run

This commit is contained in:
Roland 2026-02-26 17:45:39 -07:00
parent c076cb2f66
commit ae72b9491d
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
2 changed files with 16 additions and 4 deletions

View file

@ -4,8 +4,6 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
BUILD_DIR=/var/tmp/wrolpi-build-debian
VERSION=$(cat "${SCRIPT_DIR}/../wrolpi/version.txt")
Help() {
echo "Build WROLPi Debian Live ISO image."
echo
@ -25,6 +23,14 @@ while getopts ":hb:" option; do
esac
done
# Get version from the target git branch (not local checkout) so output filename matches actual content.
VERSION=$(curl -sL "https://raw.githubusercontent.com/lrnselfreliance/wrolpi/${BRANCH}/wrolpi/version.txt")
if [ -z "${VERSION}" ]; then
echo "ERROR: Could not fetch version from branch '${BRANCH}'"
exit 1
fi
echo "Building WROLPi version: ${VERSION} from branch: ${BRANCH}"
# Re-execute this script if it wasn't called with sudo.
if [ $EUID != 0 ]; then
sudo "$0" "$@"

View file

@ -4,8 +4,6 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
BUILD_DIR=/var/tmp/wrolpi-build-pi-gen
VERSION=$(cat "${SCRIPT_DIR}/../wrolpi/version.txt")
Help() {
echo "Build WROLPi Raspberry Pi OS image."
echo
@ -25,6 +23,14 @@ while getopts ":hb:" option; do
esac
done
# Get version from the target git branch (not local checkout) so output filename matches actual content.
VERSION=$(curl -sL "https://raw.githubusercontent.com/lrnselfreliance/wrolpi/${BRANCH}/wrolpi/version.txt")
if [ -z "${VERSION}" ]; then
echo "ERROR: Could not fetch version from branch '${BRANCH}'"
exit 1
fi
echo "Building WROLPi version: ${VERSION} from branch: ${BRANCH}"
# Re-execute this script if it wasn't called with sudo.
if [ $EUID != 0 ]; then
sudo "$0" "$@"