express-template/ci/build_tag.sh

36 lines
542 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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