qinglong/shell/pub.sh
2025-12-11 01:53:51 +08:00

29 lines
685 B
Bash
Executable File

#!/usr/bin/env bash
echo -e "开始发布"
echo -e "切换 debian 分支"
git branch -D debian
git checkout -b debian
git push --set-upstream origin debian -f
echo -e "更新cdn文件"
ts-node-transpile-only sample/tool.ts
string=$(cat version.yaml | grep "version" | egrep "[^ ]*" -o | egrep "\d\.*")
version="v$string"
echo -e "当前版本$version-debian"
echo -e "删除已经存在的本地tag"
git tag -d "$version-debian" &>/dev/null
echo -e "删除已经存在的远程tag"
git push origin :refs/tags/$version-debian &>/dev/null
echo -e "创建新tag"
git tag -a "$version-debian" -m "release $version-debian"
echo -e "提交tag"
git push --tags
echo -e "完成发布"