dev #14

Merged
vista merged 6 commits from dev into master 2024-08-26 13:46:56 +02:00
3 changed files with 8 additions and 11 deletions

View File

@@ -6,7 +6,7 @@ when:
branch:
exclude: [ main, master ]
path:
include: [ '.woodpecker/build_dev.yml', 'build/*', 'Dockerfile' ]
include: [ '.woodpecker/build_dev.yml', 'build/*', 'Dockerfile', 'gen-tag-list.sh' ]
event: [ push, manual ]
steps:

View File

@@ -31,7 +31,7 @@ steps:
gen_tags:
image: docker
commands:
- gen-version-list.sh ${CI_COMMIT_TAG} php-${PHP_VERSION}
- ./gen-version-list.sh ${CI_COMMIT_TAG} php-${PHP_VERSION}
- cat tags.txt
release_alpine_build_and_publish:

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env ash
# this script generates a tags_file for Buildx (https://woodpecker-ci.org/plugins/Docker%20Buildx)
@@ -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