Merge pull request #198 from flatcar-linux/kai/submodule-update-allow-push

ci-automation: allow to optionally push and sign the commit
This commit is contained in:
Kai Lüke 2022-01-05 15:43:47 +01:00 committed by GitHub
commit 41f6ea4020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,7 +61,16 @@ function update_and_push_version() {
git commit --allow-empty -m "New version: ${version}"
git tag -f "${version}"
local -a TAG_ARGS
if [ "${SIGN-0}" = 1 ]; then
TAG_ARGS=("-s" "-m" "${version}")
fi
git tag -f "${TAG_ARGS[@]}" "${version}"
if [ "${PUSH-0}" = 1 ]; then
git push
fi
if git push origin "${version}" ; then
return