Changeset 82409 in spip-zone


Ignore:
Timestamp:
May 15, 2014, 2:13:20 PM (5 years ago)
Author:
cam.lafit@…
Message:

Declarer le depot distant github si celui est manquant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _outils_/svn2git/trunk/git2github.sh

    r82408 r82409  
    1919        continue
    2020    fi
     21
     22    #Tester la présence du plugin sur github
     23    #http://stackoverflow.com/questions/12170459/check-if-git-remote-exists-before-first-push
     24    git --git-dir=${GIT_DIRECTORY}/${dir_plugin}.git ls-remote github -q 2>/dev/null
     25
     26    if [ "$?" -ne "0" ]; then
     27        echo "Ajout du depot github distant pour ${dir_plugin}"
     28        #http://issues.tmatesoft.com/issue/SGT-634
     29        git --git-dir=${GIT_DIRECTORY}/${dir_plugin}.git remote add github ${GITHUB_REPOSITORY}/$(basename $dir_plugin).git
     30        git --git-dir=${GIT_DIRECTORY}/${dir_plugin}.git config --add remote.github.push '+refs/heads/*:refs/heads/*'
     31        git --git-dir=${GIT_DIRECTORY}/${dir_plugin}.git config --add remote.github.push '+refs/tags/*:refs/tags/*'
     32    fi
    2133done
Note: See TracChangeset for help on using the changeset viewer.