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: branch:
exclude: [ main, master ] exclude: [ main, master ]
path: path:
include: [ '.woodpecker/build_dev.yml', 'build/*', 'Dockerfile' ] include: [ '.woodpecker/build_dev.yml', 'build/*', 'Dockerfile', 'gen-tag-list.sh' ]
event: [ push, manual ] event: [ push, manual ]
steps: steps:

View File

@@ -31,7 +31,7 @@ steps:
gen_tags: gen_tags:
image: docker image: docker
commands: commands:
- gen-version-list.sh ${CI_COMMIT_TAG} php-${PHP_VERSION} - ./gen-version-list.sh ${CI_COMMIT_TAG} php-${PHP_VERSION}
- cat tags.txt - cat tags.txt
release_alpine_build_and_publish: 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) # 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 fi
# Split the version into an array using the "." as a delimiter # 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 echo "latest$suffix" > tags.txt
echo "$1$suffix" >> tags.txt
# Iterate through the array and print each element followed by a new line echo "$1.$2$suffix" >> tags.txt
build_string="" echo "$1.$2.$3$suffix" >> tags.txt
for i in "${version_array[@]}"; do
build_string="$build_string.$i"
echo "${build_string#?}$suffix" >> tags.txt
done