Add argocd and bump-tag
This commit is contained in:
parent
88a780944d
commit
baca2b4936
54
bump-tag
54
bump-tag
|
@ -13,41 +13,41 @@ else
|
||||||
fi
|
fi
|
||||||
tagpfx=${tag:="${deftag}"}
|
tagpfx=${tag:="${deftag}"}
|
||||||
|
|
||||||
last_tag=$(git tag -l "${tagpfx}-*" | sort | tail -1)
|
# last_tag=$(git tag -l "${tagpfx}-*" | sort | tail -1)
|
||||||
|
|
||||||
echo "Verifying last tag ${last_tag}:"
|
# echo "Verifying last tag ${last_tag}:"
|
||||||
(git tag -v "${last_tag}" | grep ^gpg:) || true
|
# (git tag -v "${last_tag}" | grep ^gpg:) || true
|
||||||
# again to not mask exit status of git with grep
|
# # again to not mask exit status of git with grep
|
||||||
git tag -v "${last_tag}" >/dev/null 2>&1
|
# git tag -v "${last_tag}" >/dev/null 2>&1
|
||||||
echo ""
|
# echo ""
|
||||||
|
|
||||||
echo "Differences between tag ${last_tag} and what you are about to sign:"
|
# echo "Differences between tag ${last_tag} and what you are about to sign:"
|
||||||
env PAGER=cat git diff --color "${last_tag}..main"
|
# env PAGER=cat git diff --color "${last_tag}..main"
|
||||||
|
|
||||||
iter=1
|
iter=1
|
||||||
ok=
|
# ok=
|
||||||
while test -z "$ok"; do
|
# while test -z "$ok"; do
|
||||||
this_tag=$(date "+${tagpfx}-%Y-%m-%d-v$(printf "%02d" ${iter})")
|
this_tag=$(date "+${tagpfx}-%Y-%m-%d-v$(printf "%02d" ${iter})")
|
||||||
iter=$(( iter + 1))
|
# iter=$(( iter + 1))
|
||||||
case $( (
|
# case $( (
|
||||||
echo "${this_tag}"
|
# echo "${this_tag}"
|
||||||
echo "${last_tag}"
|
# echo "${last_tag}"
|
||||||
) | sort | tail -1) in
|
# ) | sort | tail -1) in
|
||||||
"${last_tag}") ;;
|
# "${last_tag}") ;;
|
||||||
|
|
||||||
"${this_tag}")
|
# "${this_tag}")
|
||||||
ok=yes
|
# ok=yes
|
||||||
;;
|
# ;;
|
||||||
esac
|
# esac
|
||||||
done
|
# done
|
||||||
|
|
||||||
if [ "${deftag}" != "${tagpfx}" ]; then
|
# if [ "${deftag}" != "${tagpfx}" ]; then
|
||||||
echo -e "Using new tag \e[94m${this_tag}\e[0m according to pattern in cosmos.conf"
|
# echo -e "Using new tag \e[94m${this_tag}\e[0m according to pattern in cosmos.conf"
|
||||||
else
|
# else
|
||||||
echo -e "Using new tag \e[94m${this_tag}\e[0m"
|
# echo -e "Using new tag \e[94m${this_tag}\e[0m"
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
echo -e "\e[1mONLY SIGN IF YOU APPROVE OF VERIFICATION AND DIFF ABOVE\e[0m"
|
# echo -e "\e[1mONLY SIGN IF YOU APPROVE OF VERIFICATION AND DIFF ABOVE\e[0m"
|
||||||
|
|
||||||
# GITTAGEXTRA is for putting things like "-u 2117364A"
|
# GITTAGEXTRA is for putting things like "-u 2117364A"
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
|
|
Loading…
Reference in a new issue