en mode auto, ne pas incrémenter si ce n'est pas nécessaire
le menu propose de ne pas incrémenter la version
This commit is contained in:
parent
ec89c5ea57
commit
ac8cc8753d
13
uversion
13
uversion
|
@ -106,7 +106,7 @@ parse_opts "${PRETTYOPTS[@]}" \
|
|||
-x,--major '$action=update; incversion=major' \
|
||||
-z,--minor '$action=update; incversion=minor' \
|
||||
-p,--patchlevel '$action=update; incversion=patchlevel' \
|
||||
-l:,--prelease:,--prerelease: '$action=update; set@ setprelease' \
|
||||
-l:,--prelease:,--prerelease: '$action=update; set@ setprelease; [ -z "$setprelease" ] && { setalpha=; setbeta=; setrc=; setrelease=1; }' \
|
||||
-a,--alpha '$action=update; setalpha=1; setbeta=; setrc=; setrelease=' \
|
||||
-b,--beta '$action=update; setalpha=; setbeta=1; setrc=; setrelease=' \
|
||||
-r,--rc '$action=update; setalpha=; setbeta=; setrc=1; setrelease=' \
|
||||
|
@ -243,15 +243,23 @@ elif [ "$action" == update ]; then
|
|||
fi
|
||||
|
||||
# incrémenter les numéros de version
|
||||
[ "$incversion" == auto ] && incversion=menu
|
||||
if [ "$incversion" == auto ]; then
|
||||
if [ -n "$setrelease" -o -n "$setprelease" -o -n "$setmetadata" ]; then
|
||||
incversion=
|
||||
else
|
||||
incversion=menu
|
||||
fi
|
||||
fi
|
||||
if [ "$incversion" == menu ]; then
|
||||
psemver_copy x; psemver_incmajor x; psemver_setprelease "$setprelease" x; psemver_setvar versionx x
|
||||
psemver_copy z; psemver_incminor z; psemver_setprelease "$setprelease" z; psemver_setvar versionz z
|
||||
psemver_copy p; psemver_incpatchlevel p; psemver_setprelease "$setprelease" p; psemver_setvar versionp p
|
||||
psemver_copy k; psemver_setprelease "$setprelease" k; psemver_setvar versionk k
|
||||
nextvs=(
|
||||
"$versionx : maj incompatibles de l'API (-x)"
|
||||
"$versionz : maj compatibles de l'API (-z)"
|
||||
"$versionp : correction de bugs (-p)"
|
||||
"$versionk : ne pas incrémenter la version"
|
||||
)
|
||||
nextv="${nextvs[1]}"
|
||||
simple_menu nextv nextvs \
|
||||
|
@ -261,6 +269,7 @@ elif [ "$action" == update ]; then
|
|||
*-x) incversion=major;;
|
||||
*-z) incversion=minor;;
|
||||
*-p) incversion=patchlevel;;
|
||||
*) incversion=;;
|
||||
esac
|
||||
fi
|
||||
case "$incversion" in
|
||||
|
|
Loading…
Reference in New Issue