@@ -850,11 +850,18 @@ function command_release() {
return 1
fi
# @WORKAROUND: For using git tag signing on older versions of git.
if [[ $(git -C "$base_dir" config --get tag.gpgSign) == true ]]; then
local git_tag_gpgsign=("--sign")
else
local git_tag_gpgsign=()
# Commit the changes and create a tag. GIT_VERSION_TAG_PREFIX
# comes from build configuration.
if ! git -C "$base_dir" add "$changelog_file" "$info_file" || \
! git -C "$base_dir" commit --edit -m "Prepared release $version." || \
! git -C "$base_dir" tag -a -m "Release $version." "${GIT_VERSION_TAG_PREFIX}${version}"; then
! git -C "$base_dir" tag "${git_tag_gpgsign[@]}" -a -m "Release $version." "${GIT_VERSION_TAG_PREFIX}${version}"; then
error "Failed to create release commit and tag."