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.
43 lines
692 B
43 lines
692 B
#!/usr/bin/env bash |
|
# $1 git url |
|
# $2 artifact path |
|
# $3 save dir |
|
# $4 build name |
|
# $5 source dir |
|
# $3 comment |
|
|
|
GitUrl=$1 |
|
ArtifactPath=$2 |
|
SaveDir=$3 |
|
BuildName=$4 |
|
SourcePath=$5 |
|
Comment=$6 |
|
|
|
RepoDir=$(dirname ${ArtifactPath}) |
|
RepoPath="${RepoDir}/repo/${BuildName}/${SaveDir}" |
|
ScriptDir=$(dirname ${SourcePath}) |
|
|
|
cd ${RepoPath} |
|
|
|
pwd |
|
echo $SourcePath |
|
echo $RepoPath |
|
echo $ScriptDir |
|
|
|
echo "clean old:" |
|
|
|
ls -A | grep -v '.git' | xargs rm -rf {} |
|
|
|
echo "copy new:" |
|
cp -R ${SourcePath}/src/. . |
|
#cp -R ${SourcePath}/app_data . |
|
#cp -R ${SourcePath}/bin . |
|
#cp -R ${SourcePath}/ini . |
|
#cp -R ${SourcePath}/PostDeploymentActions . |
|
|
|
|
|
git add -f . |
|
|
|
git commit -a -m "TFS:${Comment}" |
|
|
|
git push -u origin --all
|
|
|