Commit a71a2b98 authored by zauberstuhl's avatar zauberstuhl
Browse files

Fix tag name handling in CI script

parent 4140f596
Pipeline #2164 passed with stages
in 5 minutes and 2 seconds
......@@ -5,8 +5,8 @@ registry="registry.git.feneas.org/feneas/infrastructure/docker-images";
function build() {
local dir=$1;
local version=$(git tag -l "*-${dir}" --sort=-refname \
| head -1 | sed "s/^\(.*\)-${dir}/\1/");
local version=$(git tag -l "*-${dir}*" --sort=-refname \
| head -1 | sed "s/^\(.*\)-${dir}.*/\1/");
if [ "$version" != "" ] && [ -f "$dir/Dockerfile" ]; then
echo -ne "\n\nSTART BUILDING ${dir}:${version}\n\n"
......@@ -27,5 +27,5 @@ if [ "$CI_COMMIT_TAG" == "" ]; then
fi
done
else
build "$(echo $CI_COMMIT_TAG | cut -d- -f2)";
build "$(echo $CI_COMMIT_TAG | cut -d- -f2- | cut -d. -f1)";
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment