diff --git a/prel b/prel index baae0c2..d7e2841 100755 --- a/prel +++ b/prel @@ -204,12 +204,13 @@ if [ "$action" == update ]; then menu) setx majorv=pver -s "$oldver" -ux "${pver_opts[@]}" setx minorv=pver -s "$oldver" -uz "${pver_opts[@]}" - setx patchlevelv=pver -g "$oldver" -up "${pver_opts[@]}" + setx patchlevelv=pver -s "$oldver" -up "${pver_opts[@]}" release="release-$minorv" branches=("release-$majorv" "release-$minorv" "release-$patchlevelv" master) simple_menu release branches \ -t "Basculer vers une nouvelle branche de release" \ -m "Veuillez choisir la branche à créer" + [ "$release" != master ] && newver="${release#release-}" ;; major) setx newver=pver -s "$oldver" -ux "${pver_opts[@]}" @@ -291,7 +292,10 @@ Vous allez créer la nouvelle branche de release ${COULEUR_VERTE}$release${COULE pver -uv "$newver" && commitmsg="Init changelog & version $newver" fi - changelog="## Version $release du $(date +%d/%m/%Y-%H:%M)" + version="$newver" + [ -n "$version" ] || version="$release" + + changelog="## Version $version du $(date +%d/%m/%Y-%H:%M)" setx mergebase=git merge-base master "$release" setxp modifs=git log --oneline "$mergebase..$release" // grep -v "Intégration de la branche release-" [ -n "$modifs" ] && changelog="$changelog