mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-27 05:21:34 +01:00
ci-autmation: support main- alongside alpha-, beta-...
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
This commit is contained in:
parent
10dc85b099
commit
5ed28497ba
@ -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
|
||||
}
|
||||
|
||||
@ -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}")"
|
||||
|
||||
|
||||
@ -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}"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user