Don't edit git stuff when running non-interactively

This commit is contained in:
decentral1se 2021-06-03 10:17:09 +02:00
parent ece968478d
commit a1de7f10cb
Signed by: decentral1se
GPG Key ID: 92DAD76BD9567B8A
1 changed files with 10 additions and 2 deletions

12
abra
View File

@ -2209,7 +2209,11 @@ sub_recipe_release() {
fi
fi
git commit -avem "Version $new_version; sync labels" || exit
if [ "$abra___no_prompt" = "false" ]; then
git commit -avem "Version $new_version; sync labels" || exit
else
git commit -am "Version $new_version; sync labels" || exit
fi
if [ "$abra___no_prompt" = "false" ]; then
read -rp "Tag this as \`$new_version\`? [y/N]? " choice
@ -2220,7 +2224,11 @@ sub_recipe_release() {
fi
test "$force" = "true" && git tag -d "$new_version"
git tag -aem "$latest_version_message" "$new_version"
if [ "$abra___no_prompt" = "false" ]; then
git tag -aem "$latest_version_message" "$new_version"
else
git tag -am "$latest_version_message" "$new_version"
fi
}
#######################################