Skip to content

Commit a92190c

Browse files
committed
doc: avoid using hard code tag in deployment
1 parent b6409d9 commit a92190c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

docs/maintenance/deployment.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,20 @@
99
分別的部署方式如下:
1010

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

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

2425
```shell
25-
git tag | grep 'v1.0.0-' | xargs git push --delete origin
26-
git tag | grep 'v1.0.0-' | xargs git tag -d
26+
git tag | grep "$(git describe --tag --abbrev=0 | cut -d'-' -f1)-" | xargs git push --delete origin
27+
git tag | grep "$(git describe --tag --abbrev=0 | cut -d'-' -f1)-" | xargs git tag -d
2728
```

0 commit comments

Comments
 (0)