You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue serves as a (hopefully) actionable idea for implementing a dist release subcommand.
NOTES:
dist release should be configurable to not manage tags automatically, so a PR-based workflow can be used.
Commits and tags should be marked as being created by dist release, e.g. by adding something like Created with dist release <major|minor|patch>. at the end of commit messages and tag annotations.
If we annotate the tag with git tag -m $MESSAGE $TAG, we can do git push --follow-tags $BRANCH to push the commit and the tag at the same time. Conveniently, note 2 would address this.
dist release <major|minor|patch>:
Bump version number (as indicated by which of <major|minor|patch> is passed).
Run cargo test -- this both ensures things like Cargo.toml are up to date, and also ensures we fail early to minimize wasted time.
Create a release commit.
Create a release tag, unless configured to ignore it.
Push the release commit and, if created, also the tag.
Push the release commit + tag.
dist release undo:
Verify the last commit is from dist release <major|minor|patch>. Bail early if it's not. (We can't undo a commit that's had work done on top of it.)
If configured to not manage tags, continue to the next step. Otherwise, verify the last tag is from dist release; bail early if it isn't.
If configured to not manage tags, continue to the next step. Otherwise, verify the last tag points at the last commit; bail early if it doesn't.
If managing tags, remove the tag.
Remove the commit.
Maybe a dist release push?:
Verify the last commit is created by dist release. Bail early if it's not.
If configured to not manage tags, continue to the next step. Otherwise, verify the last tag is created by dist release; bail early if it isn't.
If configured to not manage tags, continue to the next step. Otherwise, verify the last tag points at the last commit; bail early if it doesn't.
If managing tags, push the last commit + last tag. Otherwise, push the last commit.
This issue serves as a (hopefully) actionable idea for implementing a
dist release
subcommand.NOTES:
dist release
should be configurable to not manage tags automatically, so a PR-based workflow can be used.dist release
, e.g. by adding something likeCreated with dist release <major|minor|patch>.
at the end of commit messages and tag annotations.git tag -m $MESSAGE $TAG
, we can dogit push --follow-tags $BRANCH
to push the commit and the tag at the same time. Conveniently, note 2 would address this.dist release <major|minor|patch>
:<major|minor|patch>
is passed).cargo test
-- this both ensures things likeCargo.toml
are up to date, and also ensures we fail early to minimize wasted time.dist release undo
:dist release <major|minor|patch>
. Bail early if it's not. (We can't undo a commit that's had work done on top of it.)dist release
; bail early if it isn't.Maybe a
dist release push
?:dist release
. Bail early if it's not.dist release
; bail early if it isn't.Related: #842
The text was updated successfully, but these errors were encountered: