糖尿病网pc端官网
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
484 B

#!/usr/bin/env bash
# $1 git url
# $2 artifact path
# $3 save dir
# $4 build name
GitUrl=$1
ArtifactPath=$2
SaveDir=$3
BuildName=$4
RepoDir=$(dirname ${ArtifactPath})
RepoPath="${RepoDir}/repo/${BuildName}"
mkdir -p ${RepoPath}
cd ${RepoPath}
if [ ! -e ${SaveDir} ]
then
git clone $1 ${SaveDir}
cd ${SaveDir}
git config user.name 'autouser'
git config user.email 'autouser@dnurse.cn'
else
cd ${SaveDir}
git reset --hard
git clean -df
git pull
fi