diff --git a/gbm-cli/cmd/release/README.md b/gbm-cli/cmd/release/README.md index 619b546..0b8420d 100644 --- a/gbm-cli/cmd/release/README.md +++ b/gbm-cli/cmd/release/README.md @@ -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 @@ -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 ``` \ No newline at end of file diff --git a/gbm-cli/cmd/release/integrate.go b/gbm-cli/cmd/release/integrate.go index 366b4d8..4adac2c 100644 --- a/gbm-cli/cmd/release/integrate.go +++ b/gbm-cli/cmd/release/integrate.go @@ -16,6 +16,7 @@ import ( ) var android, ios, both bool +var hostVersion string var IntegrateCmd = &cobra.Command{ Use: "integrate", @@ -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() { @@ -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") } diff --git a/gbm-cli/templates/checklist/checklist.html b/gbm-cli/templates/checklist/checklist.html index 1b87c38..23b135c 100644 --- a/gbm-cli/templates/checklist/checklist.html +++ b/gbm-cli/templates/checklist/checklist.html @@ -44,8 +44,13 @@

Create the Release{{ if .Scheduled }} (Thursday) {{end}}

{{ Task `Create the Gutenberg and Gutenberg Mobile release PR by running:
$ gbm-cli release prepare all %s
` .Version }} +{{ if .Scheduled}} {{ Task `After the CI tasks succeed, create the WordPress-iOS and WordPress-Android integration PRs by running:
$ gbm-cli release integrate %s
` .Version }} +{{ else }} +{{ Task `After the CI tasks succeed, create the WordPress-iOS and WordPress-Android integration PRs by running: +
$ gbm-cli release integrate %s -V 
` .Version .HostVersion}} +{{ end }} {{ if .Scheduled }}