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 ""
|
setx version=pver -g ""
|
||||||
|
|
||||||
if [ "$incversion" == auto ]; then
|
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
|
setx -a branches=list_release_branches
|
||||||
|
|
||||||
if [ ${#branches[*]} -eq 0 ]; then
|
if [ ${#branches[*]} -eq 0 ]; then
|
||||||
# en l'absence de branche de release, proposer d'en créer une
|
# en l'absence de branche de release, proposer d'en créer une
|
||||||
incversion=menu
|
incversion=menu
|
||||||
|
@ -153,28 +158,29 @@ if [ "$action" == update ]; then
|
||||||
-m "Veuillez choisir la branche vers laquelle basculer"
|
-m "Veuillez choisir la branche vers laquelle basculer"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
case "$incversion" in
|
case "$incversion" in
|
||||||
menu)
|
menu)
|
||||||
setx major=pver -s "$version" -ux "${pver_opts[@]}"
|
setx majorv=pver -s "$version" -ux "${pver_opts[@]}"
|
||||||
setx minor=pver -s "$version" -uz "${pver_opts[@]}"
|
setx minorv=pver -s "$version" -uz "${pver_opts[@]}"
|
||||||
setx patchlevel=pver -g "$version" -up "${pver_opts[@]}"
|
setx patchlevelv=pver -g "$version" -up "${pver_opts[@]}"
|
||||||
release="release-$minor"
|
release="release-$minorv"
|
||||||
branches=("release-$major" "release-$minor" "release-$patchlevel" master)
|
branches=("release-$majorv" "release-$minorv" "release-$patchlevelv" master)
|
||||||
simple_menu release branches \
|
simple_menu release branches \
|
||||||
-t "Basculer vers une nouvelle release branch" \
|
-t "Basculer vers une nouvelle release branch" \
|
||||||
-m "Veuillez choisir la branche à créer"
|
-m "Veuillez choisir la branche à créer"
|
||||||
;;
|
;;
|
||||||
major)
|
major)
|
||||||
setx major=pver -s "$version" -ux "${pver_opts[@]}"
|
setx majorv=pver -s "$version" -ux "${pver_opts[@]}"
|
||||||
release="release-$major"
|
release="release-$majorv"
|
||||||
;;
|
;;
|
||||||
minor)
|
minor)
|
||||||
setx minor=pver -s "$version" -uz "${pver_opts[@]}"
|
setx minorv=pver -s "$version" -uz "${pver_opts[@]}"
|
||||||
release="release-$minor"
|
release="release-$minorv"
|
||||||
;;
|
;;
|
||||||
patchlevel)
|
patchlevel)
|
||||||
setx patchlevel=pver -g "$version" -up "${pver_opts[@]}"
|
setx patchlevelv=pver -g "$version" -up "${pver_opts[@]}"
|
||||||
release="release-$patchlevel"
|
release="release-$patchlevelv"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue