Skip to content

Commit

Permalink
doc: avoid using hard code tag in deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
evan361425 committed Mar 25, 2024
1 parent b6409d9 commit a92190c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions docs/maintenance/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@
分別的部署方式如下:

- `internal`
1. 修改 [pubspec.yaml](https://github.com/evan361425/flutter-pos-system/blob/master/pubspec.yaml) 的版本資訊
2. 在本地端打 tag,例如:`v1.0.0-rc1`
1. 修改 [pubspec.yaml](https://github.com/evan361425/flutter-pos-system/blob/master/pubspec.yaml) 的版本資訊
2. 在本地端打 tag,例如:`v1.0.0-rc1`
3. 推到 GitHub 就會進行一系列的 CI/CD 流程。
- `beta`
1. 修改 [pubspec.yaml](https://github.com/evan361425/flutter-pos-system/blob/master/pubspec.yaml) 的版本資訊
2. 在本地端打 tag,例如:`v1.0.0-beta`
3. 推到 GitHub 就會進行一系列的 CI/CD 流程。
1. 修改 [pubspec.yaml](https://github.com/evan361425/flutter-pos-system/blob/master/pubspec.yaml) 的版本資訊;
2. 在本地端打 tag,例如:`v1.0.0-beta`
3. 推到 GitHub 就會進行一系列的 CI/CD 流程;
4. 當 CI/CD 流程結束後,透過 `git pull` 把最新的 tag 拉下來。
- `promote_to_production`
1. 把 GitHub 的 [draft release](https://github.com/evan361425/flutter-pos-system/releases) publish 出來。

確認都沒問題後,可以把舊的 tag 清掉:

```shell
git tag | grep 'v1.0.0-' | xargs git push --delete origin
git tag | grep 'v1.0.0-' | xargs git tag -d
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
```

0 comments on commit a92190c

Please sign in to comment.