From 17e17ac077df90c5e83dd17bb2ff6f25172ba86c Mon Sep 17 00:00:00 2001 From: whyour Date: Tue, 5 Apr 2022 23:11:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=91=E5=B8=83=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/pub.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 shell/pub.sh diff --git a/shell/pub.sh b/shell/pub.sh new file mode 100644 index 00000000..0e920a59 --- /dev/null +++ b/shell/pub.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +echo -e "开始发布" + +echo -e "切换master分支" +git checkout master + +echo -e "合并develop代码" +git merge origin/develop + +echo -e "提交master代码" +git push + +echo -e "更新cdn文件" +ts-node sample/tool.ts + +string = $(cat src/version.ts | grep "version" | egrep "[^\']*" -o | egrep "\d\.*") +version = "v$string" +echo -e "当前版本$version" + +echo -e "删除已经存在的本地tag" +git tag -d "$version" &>/dev/null + +echo -e "删除已经存在的远程tag" + +echo -e "创建新tag" +git tag -a "$version" -m "release $version" + +echo -e "提交tag" +git push --tags + +echo -e "完成发布" \ No newline at end of file