部署流程¶
分為三個環境:
internal
:內部測試用。beta
:對外的測試,同樣的檔案會推展到promote_to_production
。promote_to_production
:把beta
的版本推到線上。
分別的部署方式如下:
internal
- 執行
make bump
後,根據想要更新的版本輸入。
- 執行
beta
- 執行
make bump-beta
。
- 執行
promote_to_production
- 透過
git pull
把最新的 tag 拉下來; - 把 GitHub 的 draft release publish 出來。
- 透過
確認都沒問題後,可以把舊的 tag 清掉:
# 先清掉遠端的,再清掉本地端的,否則會沒辦法執行後續的 `xargs`
git tag | grep "$(git describe --tag --abbrev=0 | cut -d'-' -f1)-" | xargs git push --delete origin
git tag | grep "$(git describe --tag --abbrev=0 | cut -d'-' -f1)-" | xargs git tag -d