From b584c55c5f222502a2401e1c5b57a20ecf338de2 Mon Sep 17 00:00:00 2001 From: ckonstanski Date: Tue, 17 Oct 2017 12:06:21 -0600 Subject: git tagging --- salt/openbook/ansible/files/find_next_tag.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'salt') diff --git a/salt/openbook/ansible/files/find_next_tag.sh b/salt/openbook/ansible/files/find_next_tag.sh index 638215c..753e40c 100644 --- a/salt/openbook/ansible/files/find_next_tag.sh +++ b/salt/openbook/ansible/files/find_next_tag.sh @@ -1,7 +1,8 @@ #!/bin/bash cd "${1}" -basetag="${2}" +artifact="${2}" +basetag="${3}" lastbuild=$(git for-each-ref --sort=taggerdate --format '%(tag)' | grep -F "${basetag}" | tail -n 1 | awk -F. '{print $3}') if [ "${lastbuild}" == "" ]; then @@ -11,4 +12,5 @@ else fi git tag -a "build-${newtag}" -m "tagged by jenkins: $(date)" git push origin "build-${newtag}" -echo -n "${newtag}" +echo -n "${newtag}" > "/tmp/newtag_${artifact}" +echo 0 -- cgit v1.3