Support unattended mode for recipe releasing
continuous-integration/drone/push Build is passing Details

This commit is contained in:
decentral1se 2021-06-03 10:06:40 +02:00
parent 0ff08b5d34
commit 3759bcd641
Signed by: decentral1se
GPG Key ID: 92DAD76BD9567B8A
1 changed files with 16 additions and 8 deletions

24
abra
View File

@ -2108,8 +2108,12 @@ sub_recipe_release() {
if [ "$(git rev-parse --abbrev-ref --symbolic-full-name HEAD)" = "HEAD" ]; then
warning "It looks like $recipe_dir is in 'detached HEAD' state"
read -rp "Check out main/master branch first? [Y/n] "
if [ "${choice,,}" != "n" ]; then
if [ "$abra___no_prompt" = "false" ]; then
read -rp "Check out main/master branch first? [Y/n] "
if [ "${choice,,}" != "n" ]; then
checkout_main_or_master
fi
else
checkout_main_or_master
fi
fi
@ -2197,18 +2201,22 @@ sub_recipe_release() {
success "All compose files updated; new version is $new_version"
read -rp "Commit your changes to git? [y/N]? " choice
if [ "$abra___no_prompt" = "false" ]; then
read -rp "Commit your changes to git? [y/N]? " choice
if [ "${choice,,}" != "y" ]; then
return
if [ "${choice,,}" != "y" ]; then
return
fi
fi
git commit -avem "Version $new_version; sync labels" || exit
read -rp "Tag this as \`$new_version\`? [y/N]? " choice
if [ "$abra___no_prompt" = "false" ]; then
read -rp "Tag this as \`$new_version\`? [y/N]? " choice
if [ "${choice,,}" != "y" ]; then
return
if [ "${choice,,}" != "y" ]; then
return
fi
fi
test "$force" = "true" && git tag -d "$new_version"