possibilité de faire -u et -m dans la même commande
This commit is contained in:
parent
de618ae39c
commit
7c36761758
44
todo/prel
44
todo/prel
|
@ -106,7 +106,10 @@ OPTIONS
|
|||
|
||||
projdir=
|
||||
origin=origin
|
||||
action=checkout
|
||||
action=auto
|
||||
update=
|
||||
merge=
|
||||
checkout=
|
||||
incversion=
|
||||
pver_opts=()
|
||||
write=1
|
||||
|
@ -118,20 +121,30 @@ parse_opts "${PRETTYOPTS[@]}" \
|
|||
-O:,--origin: origin= \
|
||||
-o,--offline UTOOLS_VCS_OFFLINE=1 \
|
||||
--online UTOOLS_VCS_OFFLINE= \
|
||||
-c,--checkout '$action=checkout' \
|
||||
-u,--update '$action=update; [ -z "$incversion" ] && incversion=auto' \
|
||||
--menu '$action=update; incversion=menu' \
|
||||
-x,--major '$action=update; incversion=major' \
|
||||
-z,--minor '$action=update; incversion=minor' \
|
||||
-p,--patchlevel '$action=update; incversion=patchlevel' \
|
||||
-v: '$action=update; add@ pver_opts' \
|
||||
-c,--checkout checkout=1 \
|
||||
-u,--update '$update=1; [ -z "$incversion" ] && incversion=auto' \
|
||||
--menu '$update=1; incversion=menu' \
|
||||
-x,--major '$update=1; incversion=major' \
|
||||
-z,--minor '$update=1; incversion=minor' \
|
||||
-p,--patchlevel '$update=1; incversion=patchlevel' \
|
||||
-v: '$update=1; add@ pver_opts' \
|
||||
-w,--write write=1 \
|
||||
-n,--no-write write= \
|
||||
-m,--merge action=merge \
|
||||
-m,--merge merge=1 \
|
||||
-l,--log '$action=diff; log=1' \
|
||||
-d,--diff '$action=diff; diff=1' \
|
||||
@ args -- "$@" && set -- "${args[@]}" || die "$args"
|
||||
|
||||
if [ "$action" == auto ]; then
|
||||
if [ -n "$update" ]; then
|
||||
action=update
|
||||
elif [ -n "$merge" ]; then
|
||||
action=merge
|
||||
elif [ -n "$checkout" ]; then
|
||||
action=checkout
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$projdir" ]; then
|
||||
cd "$projdir" || die
|
||||
fi
|
||||
|
@ -261,8 +274,13 @@ Vous allez créer la nouvelle release branch ${COULEUR_VERTE}$release${COULEUR_N
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ "$r" -eq 0 -a -n "$merge" ]; then
|
||||
set -- "$release"
|
||||
action=merge
|
||||
else
|
||||
exit "$r"
|
||||
fi
|
||||
fi
|
||||
|
||||
setx -a branches=list_release_branches
|
||||
setb have_release_branches=[ ${#branches[*]} -gt 0 ]
|
||||
|
@ -284,8 +302,8 @@ if [ "$action" == merge ]; then
|
|||
|
||||
if [ -z "$release" ]; then
|
||||
if [ ${#branches[*]} -eq 0 ]; then
|
||||
ewarn "Aucune release branch n'a été préparée.
|
||||
Si vous continuez, la branche develop sera fusionnée directement dans master."
|
||||
ewarn "Aucune release branch n'a été préparée."
|
||||
ewarn "La branche develop sera fusionnée directement dans master."
|
||||
release=develop
|
||||
confirm=-y
|
||||
elif [ ${#branches[*]} -eq 1 ]; then
|
||||
|
@ -306,11 +324,11 @@ dans la branche de destination ${COULEUR_BLEUE}master${COULEUR_NORMALE}"
|
|||
ask_yesno $confirm "Voulez-vous continuer?" O || die
|
||||
|
||||
git checkout master
|
||||
git merge "$release" -m "Intégration de la release branch $release" --no-ff || die
|
||||
git merge "$release" -m "Intégration de la branche $release" --no-ff || die
|
||||
|
||||
if [ "$release" != develop ]; then
|
||||
git checkout develop
|
||||
git merge "$release" -m "Intégration de la release branch $release" --no-ff || die
|
||||
git merge "$release" -m "Intégration de la branche $release" --no-ff || die
|
||||
|
||||
git checkout master
|
||||
|
||||
|
|
Loading…
Reference in New Issue