express-template/ci/build_tag.sh

36 lines
542 B
Bash
Raw Normal View History

2021-06-28 05:52:36 +00:00
#!/bin/sh
if [ "$DRONE_BRANCH" = "ci" ]
then
echo "当前在 ci 分支 正在准备构建dev环境前的工作"
echo -n "dev" > .tags
exit 0
fi;
if [ "$DRONE_BUILD_EVENT" = "tag" ]
then
echo "Git仓库打了标签TAG=$DRONE_TAG正在准备构建prod环境前的工作"
echo -n "$DRONE_TAG" > .tags
echo -n ",latest" >> .tags
exit 0
fi;
echo "DRONE_BRANCH=$DRONE_BRANCH"
echo "DRONE_BUILD_EVENT=$DRONE_BUILD_EVENT"
echo "DRONE_TAG=$DRONE_TAG"
echo "===================不满足构建条件==================="
exit 1;