Automate StartOS package releases
Build and deploy StartOS package / build (push) Failing after 1m25s

This commit is contained in:
2026-08-08 21:14:10 -05:00
parent 2f0caaf48e
commit af5fa8ca64
5 changed files with 174 additions and 11 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
tag="${1:-}"
if [[ ! "${tag}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(_[0-9]+)$ ]]; then
echo "Invalid release tag '${tag}'. Expected vMAJOR.MINOR.PATCH_WRAPPER, for example v0.2.0_0." >&2
exit 1
fi
package_version="$({
sed -n "s/^[[:space:]]*version: '\([^']*\)'.*/\1/p" \
startos/versions/current.ts
} | head -n 1)"
if [[ -z "${package_version}" ]]; then
echo "Could not read the package version from startos/versions/current.ts." >&2
exit 1
fi
expected_tag="v${package_version/:/_}"
if [[ "${tag}" != "${expected_tag}" ]]; then
echo "Release tag '${tag}' does not match package version '${package_version}'." >&2
echo "Expected tag: ${expected_tag}" >&2
exit 1
fi
echo "Release tag ${tag} matches package version ${package_version}."