我正在为zend应用程序创建一个部署脚本.几乎只完成了脚本我想验证repo中是否存在标记以强制团队中的标记.目前我有以下代码:
# Fist update the repo to make sure all the tags are in
cd /git/repo/path
git pull
# Check if the tag exists in the rev-list.
# If it exists output should be zero,
# else an error will be shown which will go to the else statement.
if [ -z "'cd /git/repo/path && git rev-list $1..'" ]; then
echo "gogo"
else
echo "No or no correct GIT tag found"
exit
fi
Run Code Online (Sandbox Code Playgroud)
期待您的反馈!
当我在命令行中执行以下命令时:
cd /git/repo/path && git …Run Code Online (Sandbox Code Playgroud)