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