hotfix #2
@@ -1,20 +0,0 @@
|
||||
#!/bin/env bash
|
||||
|
||||
git_current_branch() {
|
||||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
|
||||
}
|
||||
CUR_BRANCH=`git_current_branch`
|
||||
|
||||
CIBLE=$1
|
||||
if [ "$CIBLE" == "" ]
|
||||
then
|
||||
CIBLE=$CUR_BRANCH
|
||||
fi
|
||||
|
||||
git_01_quick_commit.sh
|
||||
|
||||
if [ ! "$CIBLE" = "$CUR_BRANCH" ];
|
||||
then
|
||||
git checkout $CIBLE
|
||||
git pull
|
||||
fi
|
||||
@@ -1,26 +1,21 @@
|
||||
#!/bin/env bash
|
||||
|
||||
git_current_branch() {
|
||||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
|
||||
}
|
||||
CUR_BRANCH=`git_current_branch`
|
||||
|
||||
CIBLE=$1
|
||||
if [ "$CIBLE" == "" ]
|
||||
then
|
||||
CIBLE=$CUR_BRANCH
|
||||
CIBLE=$GIT_CURRENT_BRANCH
|
||||
fi
|
||||
|
||||
git_01_quick_commit.sh
|
||||
|
||||
if [ ! "$CIBLE" = "$CUR_BRANCH" ];
|
||||
if [ ! "$CIBLE" = "$GIT_CURRENT_BRANCH" ];
|
||||
then
|
||||
git_00_checkout_branch.sh $CIBLE
|
||||
fi
|
||||
|
||||
git push all
|
||||
|
||||
if [ ! "$CIBLE" = "$CUR_BRANCH" ];
|
||||
if [ ! "$CIBLE" = "$GIT_CURRENT_BRANCH" ];
|
||||
then
|
||||
git_00_checkout_branch.sh $CUR_BRANCH
|
||||
git_00_checkout_branch.sh $GIT_CURRENT_BRANCH
|
||||
fi
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
#!/bin/env bash
|
||||
|
||||
git_current_branch() {
|
||||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
|
||||
}
|
||||
CUR_BRANCH=`git_current_branch`
|
||||
|
||||
CIBLE=$1
|
||||
if [ "$CIBLE" == "" ]
|
||||
then
|
||||
CIBLE=$CUR_BRANCH
|
||||
CIBLE=$GIT_CURRENT_BRANCH
|
||||
fi
|
||||
|
||||
internal_delete_branch() {
|
||||
@@ -27,7 +22,7 @@ delete_branch() {
|
||||
|
||||
git_03_push_branch.sh
|
||||
|
||||
if [ ! "$CUR_BRANCH" = "develop" ]
|
||||
if [ ! "$GIT_CURRENT_BRANCH" = "develop" ]
|
||||
then
|
||||
echo "La branche actuelle n'est pas develop"
|
||||
read -p "Voulez-vous basculer sur develop ? " -n 1 -r
|
||||
@@ -39,7 +34,7 @@ then
|
||||
fi
|
||||
|
||||
case $CIBLE in
|
||||
($CUR_BRANCH) echo "Impossible : $CIBLE is current branch !";;
|
||||
($GIT_CURRENT_BRANCH) echo "Impossible : $CIBLE is current branch !";;
|
||||
("evo"*) delete_branch $CIBLE;;
|
||||
("ano"*) delete_branch $CIBLE;;
|
||||
(*) echo "$CIBLE is not a feature branch";;
|
||||
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/env bash
|
||||
|
||||
CIBLE=$1
|
||||
if [ "$CIBLE" == "" ]
|
||||
then
|
||||
CIBLE=$GIT_CURRENT_BRANCH
|
||||
fi
|
||||
|
||||
git_01_quick_commit.sh
|
||||
|
||||
if [ ! "$CIBLE" = "$GIT_CURRENT_BRANCH" ];
|
||||
then
|
||||
git checkout $CIBLE
|
||||
git pull
|
||||
fi
|
||||
@@ -1,14 +1,9 @@
|
||||
#!/bin/env bash
|
||||
|
||||
git_current_branch() {
|
||||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
|
||||
}
|
||||
CUR_BRANCH=`git_current_branch`
|
||||
|
||||
TEST=`git status | grep propre | wc -l`
|
||||
if [ $TEST -eq 0 ]
|
||||
then
|
||||
echo "La branche actuelle ($CUR_BRANCH) n'est pas propre"
|
||||
echo "La branche actuelle ($GIT_CURRENT_BRANCH) n'est pas propre"
|
||||
|
||||
echo # (optional) move to a new line
|
||||
read -p "Voulez-vous voir les modifications courantes ? " -n 1 -r
|
||||
@@ -1,9 +1,14 @@
|
||||
#!/bin/env bash
|
||||
|
||||
git_current_branch() {
|
||||
git_parse_branches() {
|
||||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
|
||||
}
|
||||
export CUR_BRANCH=`git_current_branch`o
|
||||
|
||||
git_current_branch() {
|
||||
export GIT_CURRENT_BRANCH="$(git_parse_branches)"
|
||||
}
|
||||
|
||||
git_current_branch
|
||||
|
||||
usage(){
|
||||
echo
|
||||
@@ -22,8 +27,8 @@ GITCMD=$1
|
||||
shift
|
||||
|
||||
case $GITCMD in
|
||||
("checkout") git_00_checkout_branch.sh $@;;
|
||||
("status") git_00_status.sh $@;;
|
||||
("checkout") git_98_checkout_branch.sh $@;;
|
||||
("status") git_99_status.sh $@;;
|
||||
("commit") git_01_quick_commit.sh $@;;
|
||||
("add") git_02_add_branch.sh $@;;
|
||||
("push") git_03_push_branch.sh $@;;
|
||||
|
||||
Reference in New Issue
Block a user