BlueGit

timfa posprint

Files

posprint / scripts / ci / experimental-version.sh

experimental-version.sh

experimental-version.sh 575 B Download Raw
1#!/usr/bin/env bash
2# Version for experimental/tspl2 builds: <next stable version>-tspl2.<pipeline id>
3# (a semver prerelease of the next release, e.g. 0.5.10-tspl2.486).
4# Never a bare X.Y.Z, so it can never collide with a stable release or AUR.
5set -euo pipefail
6cd "$(dirname "$0")/../.."
7base="$(bash scripts/ci/next-version.sh | tr -d '\r')"
8base="${base%%-*}"
9mkdir -p artifacts
10v="${base}-tspl2.${CI_PIPELINE_ID:-0}"
11[[ "$v" =~ ^[0-9]+\.[0-9]+\.[0-9]+-tspl2\.[0-9]+$ ]] || { echo "Invalid experimental version: $v" >&2; exit 1; }
12echo "$v" | tee artifacts/version.txt