您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 

39 行
705 B

#!/bin/env bash
DIRNAME=`dirname $0`
echo "Il vaudrait mieux passer par https://git.topisto.net/topisto/suivi_projets"
read -p "Are you sure ?" -n 1 -r
echo    # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
    # do dangerous stuff
    $DIRNAME/01_quick_commit.sh
    courante=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | sed 's:(::g' | sed 's:)::g'`
    cible=develop
    if [ "$courante" = "develop" ]
    then
	    cible=hotfix
    fi
    if [ "$courante" = "hotfix" ]
    then
	    cible=production
    fi
    echo merge $courante into $cible
    git push
    git checkout $cible
    git merge $courante
    git push
    git checkout $courante
fi