Closed derekblank closed 10 months ago
@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:
[x] The structure of the original gbm-cli
branch and the branch the current trunk
(with the Gutenberg prepare
command) are a bit different. Does the directory structure proposed here make sense, or should we move where we want to place this Gutenberg Mobile prepare command?
[x] In gbm.go in this PR, I started updating some of the git methods from using go-git
to using our own git.go
methods. We already discussed not using go-git
library due to some of its limitations (which I agree is a good idea), but wanted to check on the methods that this PR adds in git.go
. Some of them still need some updating, particularly with the pointers.
@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 prepare
subcommands from trunk, and wired up the GBM prepare command to call CreateGbmPR
, e.g.:
GBM_WORDPRESS_ORG=derekblank go run main.go release prepare gbm v1.0.6
It's invoking the CreateGbmPR
command correctly, but there's still an issue with the tmp directory. Perhaps it's how we're passing tempDir here, or setting the gbmDir
here.
@jhnstn I believe the issue with nothing to commit, working tree clean
was that the remote origin and upstream branch was not being set in git. I added git interfaces to add these to the GBM prepare command, but the syntax might need some tweaks to get it right.
@derekblank I got this working. The PR body is empty but going to merge as is
Adds
prepare
function for Gutenberg Mobile:The intent of the Gutenberg Mobile prepare command: