Skip to content

feat(publish): Add optional post-release script#144

Merged
BYK merged 5 commits into
masterfrom
byk/feat/post-publish-script
Dec 8, 2020
Merged

feat(publish): Add optional post-release script#144
BYK merged 5 commits into
masterfrom
byk/feat/post-publish-script

Conversation

@BYK

@BYK BYK commented Dec 4, 2020

Copy link
Copy Markdown
Member

This PR adds an optional post-release script which is needed for
projects like getsentry/sentry and
getsentry/onpremise. This would help keeping
the common publish/release repo and its downstream project independent.

This PR adds an optional post-release script which is needed for
projects like [getsentry/sentry](https://git.io/JIs4n) and
[getsentry/onpremise](https://git.io/JIs4l). This would help keeping
the common publish/release repo and its downstream project independent.
Comment thread src/commands/publish.ts Outdated
Comment thread src/commands/publish.ts Outdated

@chadwhitacre chadwhitacre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the feature. It makes sense to support the specific use case of bumping the version post-release, and in general as a parallel to the pre-release hook. That said, this PR has the speed/quality dial set pretty far on "speed." I'm approving in case "speed" is where we want the dial set. If we want to turn the dial more towards quality and take on less tech debt, here are some suggestions:

  1. Refactor to deduplicate code between runPreReleaseCommand and runPostReleaseCommand.
  2. Test the post-release command hook in the test suite. There are tests for the pre-release hook. Either duplicate or refactor, based on decision under (1).
  3. Update the documentation in the README. There's a section for the pre-release script; either duplicate or refactor.

@BYK

BYK commented Dec 7, 2020

Copy link
Copy Markdown
Member Author

@chadwhitacre will address points 2 and 3 in your feedback before merging, thanks a lot! (I may take a stab at 1 but no promises).

@BYK

BYK commented Dec 8, 2020

Copy link
Copy Markdown
Member Author

I need another review, especially for the README changes.

@chadwhitacre - I've opted not to refactor/DRY the common parts in script runners as the optional nature of the post-release script makes this effort mostly fruitless (adds more complexity).

@chadwhitacre chadwhitacre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple doc nits, otherwise lgtm.

Comment thread README.md Outdated
Comment thread README.md Outdated
Co-authored-by: Chad Whitacre <[email protected]>
@BYK
BYK merged commit 1b16533 into master Dec 8, 2020
@BYK
BYK deleted the byk/feat/post-publish-script branch December 8, 2020 16:10

@tonyo tonyo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple small things

Comment thread README.md
Comment thread README.md
BYK added a commit that referenced this pull request Dec 9, 2020
BYK added a commit that referenced this pull request Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants