Skip to content

Commit

Permalink
[CLI]Update Integrate patch release (#237)
Browse files Browse the repository at this point in the history
* Set base branch to the main app release branch

* Update checklist for integrating patch releases

* Update commadn readme
  • Loading branch information
jhnstn authored Feb 23, 2024
1 parent 7c39068 commit 49c7972
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gbm-cli/cmd/release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ go run main.go release integrate v1.107.0
**Flags**
- `-a`, `--android`: Only integrate Android
- `-i`, `--ios`: Only integrate iOS
- `-V` : Host app version (required for patch releases)
- `-h`, `--help`: Command line help for `integrate` command

### status
Expand All @@ -59,5 +60,5 @@ Command used to check the status of any given release:
**Usage**

```
go run main.go release status 1.07.0
go run main.go release status 1.07.0
```
9 changes: 9 additions & 0 deletions gbm-cli/cmd/release/integrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
)

var android, ios, both bool
var hostVersion string

var IntegrateCmd = &cobra.Command{
Use: "integrate",
Expand All @@ -39,6 +40,13 @@ var IntegrateCmd = &cobra.Command{
GbmPr: gbmPr,
}

if semver.IsPatchRelease() {
if hostVersion == "" {
exitIfError(errors.New("host version is required for patch releases"), 1)
}
ri.BaseBranch = fmt.Sprintf("release/%s", hostVersion)
}

results := []gh.PullRequest{}

createAndroidPr := func() {
Expand Down Expand Up @@ -113,4 +121,5 @@ func init() {
tempDir = workspace.Dir()
IntegrateCmd.Flags().BoolVarP(&android, "android", "a", false, "Only integrate Android")
IntegrateCmd.Flags().BoolVarP(&ios, "ios", "i", false, "Only integrate iOS")
IntegrateCmd.Flags().StringVarP(&hostVersion, "host-version", "V", "", "host app version")
}
5 changes: 5 additions & 0 deletions gbm-cli/templates/checklist/checklist.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ <h3>Create the Release{{ if .Scheduled }} (Thursday) {{end}}</h3>
{{ Task `Create the Gutenberg and Gutenberg Mobile release PR by running:
<pre>$ gbm-cli release prepare all %s</pre>` .Version }}

{{ if .Scheduled}}
{{ Task `After the CI tasks succeed, create the WordPress-iOS and WordPress-Android integration PRs by running:
<pre>$ gbm-cli release integrate %s</pre>` .Version }}
{{ else }}
{{ Task `After the CI tasks succeed, create the WordPress-iOS and WordPress-Android integration PRs by running:
<pre>$ gbm-cli release integrate %s -V </pre>` .Version .HostVersion}}
{{ end }}

{{ if .Scheduled }}
<!-- wp:group -->
Expand Down

0 comments on commit 49c7972

Please sign in to comment.