ci-autmation: support main- alongside alpha-, beta-...

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
This commit is contained in:
Thilo Fromm 2021-10-28 17:05:14 +02:00 committed by flatcar-ci
parent 10dc85b099
commit 5ed28497ba
3 changed files with 4 additions and 4 deletions

View File

@ -34,8 +34,8 @@ function update_submodule() {
function check_version_string() {
local version="$1"
if ! echo "${version}" | grep -qE '^(alpha-|beta-|stable-|lts-)' ; then
echo "ERROR: invalid version '${version}', must start with 'alpha-', 'beta-', 'stable-', 'lts-'"
if ! echo "${version}" | grep -qE '^(main-|alpha-|beta-|stable-|lts-)' ; then
echo "ERROR: invalid version '${version}', must start with 'main-', 'alpha-', 'beta-', 'stable-', or 'lts-'"
exit 1
fi
}

View File

@ -30,7 +30,7 @@ function garbage_collect() {
keep="$((keep + 1))" # for tail -n+...
local purge_versions="$(git tag -l --sort=-committerdate \
| grep -E '(alpha|beta|stable|lts|sdk)-[0-9]+\.[0-9]+\.[0-9]+\-.*' \
| grep -E '(main|alpha|beta|stable|lts|sdk)-[0-9]+\.[0-9]+\.[0-9]+\-.*' \
| grep -vE '(-pro)$' \
| tail -n+"${keep}")"

View File

@ -89,7 +89,7 @@ function packages_build() {
echo "docker image rm -f '${sdk_image}'" >> ./ci-cleanup.sh
# Set name of the packages container for later rename / export
local vernum="${version#*-}" # remove alpha-,beta-,stable-,lts- version tag
local vernum="${version#*-}" # remove main-,alpha-,beta-,stable-,lts- version tag
local docker_vernum="$(vernum_to_docker_image_version "${vernum}")"
local packages_container="flatcar-packages-${arch}-${docker_vernum}"