diff options
Diffstat (limited to 'salt')
| -rw-r--r-- | salt/openbook/ansible/files/find_next_tag.sh | 6 |
1 files changed, 4 insertions, 2 deletions
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 |
