Support unattended mode for recipe releasing
This commit is contained in:
parent
0ff08b5d34
commit
3759bcd641
8
abra
8
abra
@ -2108,10 +2108,14 @@ 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"
|
||||
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
|
||||
|
||||
mapfile -t extra_compose_files < <(ls -- compose.*.yml 2> /dev/null || true)
|
||||
@ -2197,19 +2201,23 @@ sub_recipe_release() {
|
||||
|
||||
success "All compose files updated; new version is $new_version"
|
||||
|
||||
if [ "$abra___no_prompt" = "false" ]; then
|
||||
read -rp "Commit your changes to git? [y/N]? " choice
|
||||
|
||||
if [ "${choice,,}" != "y" ]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
git commit -avem "Version $new_version; sync labels" || exit
|
||||
|
||||
if [ "$abra___no_prompt" = "false" ]; then
|
||||
read -rp "Tag this as \`$new_version\`? [y/N]? " choice
|
||||
|
||||
if [ "${choice,,}" != "y" ]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
test "$force" = "true" && git tag -d "$new_version"
|
||||
git tag -aem "$latest_version_message" "$new_version"
|
||||
|
Reference in New Issue
Block a user