Created
October 8, 2012 11:51
-
-
Save amdgigabyte/3852105 to your computer and use it in GitHub Desktop.
from git repo to svn repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# build from git repo to svn repo | |
srcDir=~/Sites/workspace/pix/ | |
vsDir=~/Sites/vhosts/a.tbcdn.cn/apps/pix/ | |
toolsDir=$srcDir'tools/' | |
echo 'Now build from Git branch to SVN branch' | |
gitTimeStamp=`git st $srcDir | grep -Eo '(SVN.*$|SVN/TRUNK)'` | |
gitTimeStamp=${gitTimeStamp##SVN/} | |
if [ $gitTimeStamp = '' ];then | |
echo $gitTimeStamp | |
echo 'git 分支的规则不正确' | |
exit | |
else | |
echo $gitTimeStamp | |
svnTimeStamp=`svn info $vsDir | grep -Eo 'http://svn.app.taobao.net/repos/pix/(branches/TRC_[0-9]{8}|trunk)'` | |
svnTimeStamp=${svnTimeStamp##http://svn.app.taobao.net/repos/pix/} | |
echo $svnTimeStamp | |
#如果svn和git的分支或者主干对应,那么就执行build | |
# | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment