diff --git a/games/factorio_development.sh b/games/factorio_development.sh index 9d41bc2b0266a6881ed3f7d9a086c40c8395fd2a..d4a9d5510c10cc572457df0fa49c4ca75a27be8e 100755 --- a/games/factorio_development.sh +++ b/games/factorio_development.sh @@ -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=() + fi + # 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." return 1