添加drone配置示例

This commit is contained in:
2021-06-28 13:52:36 +08:00
parent 651d24ad3b
commit fd85fcef74
2 changed files with 103 additions and 0 deletions

35
ci/build_tag.sh Normal file
View File

@@ -0,0 +1,35 @@
#!/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;