allow installation of a specific tag/branch by exporting PBC_GIT_TAG

This commit is contained in:
2026-08-27 23:29:43 +02:00
parent 2fdf065017
commit 0f61e177f8
2 changed files with 16 additions and 5 deletions
+4 -4
View File
@@ -13,7 +13,7 @@ function cleanup_work_dir() {
function download_files() {
local path rc
local query_params=''
[ -n "$GIT_TAG" ] && query_params="?ref=$GIT_TAG"
[ -n "$PBC_GIT_TAG" ] && query_params="?ref=$PBC_GIT_TAG"
while (( $# > 0 )); do
path=$1
@@ -26,9 +26,9 @@ function download_files() {
done
}
GIT_TAG=$(curl -fsSL "$API_ENDPOINT/tags" | grep -o '{"name":"[^"]*"' | sed 's/^{"name":"//;s/"$//' | grep -E '^v[0-9]+' | sort --version-sort | tail -n 1)
if [ -n "$GIT_TAG" ]; then
echo "Info: installing pbc version $GIT_TAG"
[ -z "$PBC_GIT_TAG" ] && PBC_GIT_TAG=$(curl -fsSL "$API_ENDPOINT/tags" | grep -o '{"name":"[^"]*"' | sed 's/^{"name":"//;s/"$//' | grep -E '^v[0-9]+' | sort --version-sort | tail -n 1)
if [ -n "$PBC_GIT_TAG" ]; then
echo "Info: installing pbc version $PBC_GIT_TAG"
else
echo "Warning: no Git tag found, installing from repository default branch" >&2
fi