ci-automation: allow to optionally push and sign the commit

For test builds the commit that updates the submodules can be free-
standing but for releases we need to push it to the branch and also
sign the tag.
Add optional arguments that are used by the tag-release script in
flatcar-build-scripts.
This commit is contained in:
Kai Lueke 2022-01-05 14:21:08 +01:00
parent 536acc3dab
commit e85a16fe1c

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