You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
542 B
Bash

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#!/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;