final tags fix
[SKIP CI]
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
# this script generates a tags_file for Buildx (https://woodpecker-ci.org/plugins/Docker%20Buildx)
|
# this script generates a tags_file for Buildx (https://woodpecker-ci.org/plugins/Docker%20Buildx)
|
||||||
|
|
||||||
|
|
||||||
# Check if a command-line argument is provided
|
# Check if a command-line argument is provided
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "Please provide a version as a command-line argument."
|
echo "Please provide a version as a command-line argument."
|
||||||
@@ -20,11 +19,7 @@ if [[ "${version:0:1}" == "V" || "${version:0:1}" == "v" ]]; then
|
|||||||
version="${version#?}"
|
version="${version#?}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Split the version into an array using the "." as a delimiter
|
|
||||||
# this sets $1 $2 and $3
|
|
||||||
IFS='.' set -- "$version"
|
|
||||||
|
|
||||||
echo "latest$suffix" > tags.txt
|
echo "latest$suffix" > tags.txt
|
||||||
echo "$1$suffix" >> tags.txt
|
echo "$version" | cut -d'.' -f1 | xargs -I {} echo "{}$suffix" >> tags.txt
|
||||||
echo "$1.$2$suffix" >> tags.txt
|
echo "$version" | cut -d'.' -f1,2 | xargs -I {} echo "{}$suffix" >> tags.txt
|
||||||
echo "$1.$2.$3$suffix" >> tags.txt
|
echo "$version" | cut -d'.' -f1,2,3 | xargs -I {} echo "{}$suffix" >> tags.txt
|
||||||
Reference in New Issue
Block a user