support de -v en mode auto
This commit is contained in:
parent
4b64305dbb
commit
f98c977cde
32
todo/prel
32
todo/prel
|
@ -134,9 +134,14 @@ if [ "$action" == update ]; then
|
|||
setx version=pver -g ""
|
||||
|
||||
if [ "$incversion" == auto ]; then
|
||||
# s'il existe déjà une branche de release, prendre celle-là
|
||||
if [ ${#pver_opts[*]} -gt 0 ]; then
|
||||
# des options ont été spécifiées, les honorer
|
||||
setx specv=pver -s "$version" "${pver_opts[@]}"
|
||||
release="release-$specv"
|
||||
else
|
||||
# sinon, prendre une décision en fonction des branches de release
|
||||
# qui existent déjà
|
||||
setx -a branches=list_release_branches
|
||||
|
||||
if [ ${#branches[*]} -eq 0 ]; then
|
||||
# en l'absence de branche de release, proposer d'en créer une
|
||||
incversion=menu
|
||||
|
@ -153,28 +158,29 @@ if [ "$action" == update ]; then
|
|||
-m "Veuillez choisir la branche vers laquelle basculer"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
case "$incversion" in
|
||||
menu)
|
||||
setx major=pver -s "$version" -ux "${pver_opts[@]}"
|
||||
setx minor=pver -s "$version" -uz "${pver_opts[@]}"
|
||||
setx patchlevel=pver -g "$version" -up "${pver_opts[@]}"
|
||||
release="release-$minor"
|
||||
branches=("release-$major" "release-$minor" "release-$patchlevel" master)
|
||||
setx majorv=pver -s "$version" -ux "${pver_opts[@]}"
|
||||
setx minorv=pver -s "$version" -uz "${pver_opts[@]}"
|
||||
setx patchlevelv=pver -g "$version" -up "${pver_opts[@]}"
|
||||
release="release-$minorv"
|
||||
branches=("release-$majorv" "release-$minorv" "release-$patchlevelv" master)
|
||||
simple_menu release branches \
|
||||
-t "Basculer vers une nouvelle release branch" \
|
||||
-m "Veuillez choisir la branche à créer"
|
||||
;;
|
||||
major)
|
||||
setx major=pver -s "$version" -ux "${pver_opts[@]}"
|
||||
release="release-$major"
|
||||
setx majorv=pver -s "$version" -ux "${pver_opts[@]}"
|
||||
release="release-$majorv"
|
||||
;;
|
||||
minor)
|
||||
setx minor=pver -s "$version" -uz "${pver_opts[@]}"
|
||||
release="release-$minor"
|
||||
setx minorv=pver -s "$version" -uz "${pver_opts[@]}"
|
||||
release="release-$minorv"
|
||||
;;
|
||||
patchlevel)
|
||||
setx patchlevel=pver -g "$version" -up "${pver_opts[@]}"
|
||||
release="release-$patchlevel"
|
||||
setx patchlevelv=pver -g "$version" -up "${pver_opts[@]}"
|
||||
release="release-$patchlevelv"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in New Issue