gen tags test
Some checks failed
ci/woodpecker/manual/build_dev Pipeline failed

This commit is contained in:
Ruben Momoa
2024-08-26 13:39:30 +02:00
parent a74d2c217b
commit 07725c2ced

View File

@@ -21,13 +21,10 @@ if [[ "${version:0:1}" == "V" || "${version:0:1}" == "v" ]]; then
fi
# Split the version into an array using the "." as a delimiter
IFS='.' read -ra version_array <<< "$version"
# this sets $1 $2 and $3
IFS='.' set -- "$version"
echo "latest$suffix" > tags.txt
# Iterate through the array and print each element followed by a new line
build_string=""
for i in "${version_array[@]}"; do
build_string="$build_string.$i"
echo "${build_string#?}$suffix" >> tags.txt
done
echo "$1$suffix" >> tags.txt
echo "$1.$2$suffix" >> tags.txt
echo "$1.$2.$3$suffix" >> tags.txt