mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 14:11:07 +02:00
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:
parent
536acc3dab
commit
e85a16fe1c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user