-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add command to prepare GBM release #158
Conversation
@jhnstn This is currently a WIP based on the previous version of gbm-cli/cli/pkg/gbm/gbm.go. There are still a few items to address and get feedback on:
|
cli/pkg/git/git.go
Outdated
@@ -14,6 +16,30 @@ func Clone(repo, dir string, shallow bool) error { | |||
return cmd("clone", repo) | |||
} | |||
|
|||
func CloneGBM(dir string, pr gh.PullRequest, verbose bool) (*g.Repository, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about putting something this GBM specific in the git
package. Feels like it belongs in gbm/gbm.go
Not a blocker but something to consider as a refactor.
@jhnstn Updated the PR with the output of our pairing session and then continued the rest of the steps to create the PR based on (gb.go and the previous release-automation script). There may be some tweaks needed to gbm.go as you work it into a release command, but otherwise marking this release pkg PR as read to review. Feel free to make any tweaks on this branch as well, or we can merge and iterate from there to keep code consolidated more quickly. |
@jhnstn I merged the
It's invoking the |
@jhnstn I believe the issue with |
@derekblank I got this working. The PR body is empty but going to merge as is |
* Add base gbm prepare command * Add CloneGBM function to git pkg * Add git submodule utility functions * Update gbm.go * Add Submodule to git client * Update gbm.go steps * Add UpdateReleaseNotes util * Add Bundle exec command * Add GBM PR body template * Add steps to preview and create Gutenberg Mobile PR * Add code comments to gbm prepare command * Call CreateGbmPR from gbm release subcommand * Add shell package for shell based commands inludes git, npm, and bundler * Update gb.go to use the new shell commands * Update gbm release package * Add SetUpstreamTo and AddRemote git interfaces * Add remote and set upstream to GBM prepare command * Place the success message after verifying the PR was created * Add prepare cmd utils * Update SetUpstreamTo signature * Reorder some events and clean up logging messages * Add a cmd utils package * Move temp directory helpers to the cmd utils * Deprecate the console error functions * Use the cmd utils to exit on error * Fix how the deferred function is handling cleanup * Add git submodule utility functions * Add Submodule to git client * Call CreateGbmPR from gbm release subcommand * Update gb.go to use the new shell commands * Update exit on prepare gbm command --------- Co-authored-by: jhnstn <[email protected]> Co-authored-by: Jason Johnston <[email protected]>
* Add yaml processor * Fix mod files * Pass pr by value to preview function * Add new subcommand for target repos * Add a cmd utils package * Move temp directory helpers to the cmd utils * Deprecate the console error functions * Use the cmd utils to exit on error * Fix how the deferred function is handling cleanup * Add command to prepare GBM release (#158) * Add base gbm prepare command * Add CloneGBM function to git pkg * Add git submodule utility functions * Update gbm.go * Add Submodule to git client * Update gbm.go steps * Add UpdateReleaseNotes util * Add Bundle exec command * Add GBM PR body template * Add steps to preview and create Gutenberg Mobile PR * Add code comments to gbm prepare command * Call CreateGbmPR from gbm release subcommand * Add shell package for shell based commands inludes git, npm, and bundler * Update gb.go to use the new shell commands * Update gbm release package * Add SetUpstreamTo and AddRemote git interfaces * Add remote and set upstream to GBM prepare command * Place the success message after verifying the PR was created * Add prepare cmd utils * Update SetUpstreamTo signature * Reorder some events and clean up logging messages * Add a cmd utils package * Move temp directory helpers to the cmd utils * Deprecate the console error functions * Use the cmd utils to exit on error * Fix how the deferred function is handling cleanup * Add git submodule utility functions * Add Submodule to git client * Call CreateGbmPR from gbm release subcommand * Update gb.go to use the new shell commands * Update exit on prepare gbm command --------- Co-authored-by: jhnstn <[email protected]> Co-authored-by: Jason Johnston <[email protected]> * Make shell command interfaces public Also rename factory functions to add clarity * Work in progress * add dir to the try exec command * Update yq test to handle dots in values * Update integration package to return the pr * Fill in the create pr flows to the integrate cmd * Update integrate to use the new exit flow * Get Android PR working * Add keep flag to keep the temp directory around after the command * Add cleaner factory function * Add rake to the shell package * get integrate working for ios --------- Co-authored-by: Derek Blank <[email protected]>
* Add yaml processor * Fix mod files * Pass pr by value to preview function * Add new subcommand for target repos * Add a cmd utils package * Move temp directory helpers to the cmd utils * Deprecate the console error functions * Use the cmd utils to exit on error * Fix how the deferred function is handling cleanup * Add command to prepare GBM release (#158) * Add base gbm prepare command * Add CloneGBM function to git pkg * Add git submodule utility functions * Update gbm.go * Add Submodule to git client * Update gbm.go steps * Add UpdateReleaseNotes util * Add Bundle exec command * Add GBM PR body template * Add steps to preview and create Gutenberg Mobile PR * Add code comments to gbm prepare command * Call CreateGbmPR from gbm release subcommand * Add shell package for shell based commands inludes git, npm, and bundler * Update gb.go to use the new shell commands * Update gbm release package * Add SetUpstreamTo and AddRemote git interfaces * Add remote and set upstream to GBM prepare command * Place the success message after verifying the PR was created * Add prepare cmd utils * Update SetUpstreamTo signature * Reorder some events and clean up logging messages * Add a cmd utils package * Move temp directory helpers to the cmd utils * Deprecate the console error functions * Use the cmd utils to exit on error * Fix how the deferred function is handling cleanup * Add git submodule utility functions * Add Submodule to git client * Call CreateGbmPR from gbm release subcommand * Update gb.go to use the new shell commands * Update exit on prepare gbm command --------- Co-authored-by: jhnstn <[email protected]> Co-authored-by: Jason Johnston <[email protected]> * Make shell command interfaces public Also rename factory functions to add clarity * Work in progress * add dir to the try exec command * Update yq test to handle dots in values * Update integration package to return the pr * Fill in the create pr flows to the integrate cmd * Update integrate to use the new exit flow * Get Android PR working * Add keep flag to keep the temp directory around after the command * Add cleaner factory function * Add rake to the shell package * get integrate working for ios * Add workspace package for managing the temp directories * update commands to use the new workspace package * Refactor workspace into an interface --------- Co-authored-by: Derek Blank <[email protected]>
Adds
prepare
function for Gutenberg Mobile:The intent of the Gutenberg Mobile prepare command: