标签:echo 检出 tla 本地 实现 ima jenkins配置 build track
#!/bin/bash
pro=`ls -l /data/git-release/web | awk ‘{print $9}‘ | sed ‘/^$/d‘`
dir=/data/git-release/web
tag=$1
for i in $pro
do
cd $dir/$i
echo "更新索引..."
git pull
echo "删除本地release分支..."
git branch -D release
echo "检出远程release分支..."
git checkout --track origin/release
echo "删除本地master分支..."
git branch -D master
echo "从release检出最新的master分支代码..."
git checkout -b master --track origin/release
echo "重置master分支代码..."
git push origin master
echo "重置完成,主干代码已更新.开始标注tag.."
git tag -a $tag -m "$tag"
echo -e "tag标注结束,开始推送tag $tag..."
git push origin $tag
echo -e "$tag 推送成功,本次发版结束."
done
标签:echo 检出 tla 本地 实现 ima jenkins配置 build track
原文地址:https://blog.51cto.com/10874766/2513147