-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
chore: update release scripts #466
Conversation
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 had some minor nits/questions about the bash script changes. Thanks so much for working on this!
bin/release.sh
Outdated
tmp_changelog_path="tmp-changelog" | ||
tmp_commit_msg_path="tmp-commit-msg" |
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.
hmm, this is a bit unfortunate, since it creates the temporary files in the current working dir, and if the script exits early due to a command failing, the temporary files will be left behind.
we should maybe consider using mktmp
to create a temporary dir files in the system's temporary directory (e.g. /tmp
), instead. that way, even if we're not able to properly clean up our tempfiles, the system will eventually delete them, and we won't have issues with a pre-existing temp file with the same name.
see here for details on how to use mktemp
in a cross platform (linux & BSDs like MacOS) way.
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.
Done.
bin/release.sh
Outdated
@@ -111,7 +174,7 @@ publish() { | |||
echo "# " "${git_push_tags[@]}" | |||
else | |||
"${git_tag[@]}" | |||
"${git_push_tags[@]}" | |||
#"${git_push_tags[@]}" |
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.
why is this commented out? should we delete it? or, do we need to put it back so that the tag is actually pushed?
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.
Updated: I moved the push to a separate step after publish, with it's own confirmation.
cliff.toml
Outdated
# Fixes for specific commit messages that we wish we'd committed differently | ||
{ pattern = """^bump tonic\\/prost dependencies and MSRV to 1.64 \\(#464\\)\\s+ | ||
(.+\\s+.+)""", replace = """feat(api): update `tonic` to v0.10 and increase MSRV to 1.64 (#464) | ||
|
||
BREAKING CHANGE: | ||
This is a breaking change for users of `console-api` and `console-subscriber`, | ||
as it changes the public `tonic` dependency to a semver-incompatible version. | ||
This breaks compatibility with `tonic` 0.9. and `prost` 0.11.""" }, |
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.
sigh...this is a good call, but it's unfortunate that we have to do this. maybe at some point we should go back and edit the git history so that that commit isn't screwy...this looks good for now though.
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.
Removed now that you updated the commit.
bin/release.sh
Outdated
--publish-dry-run | ||
Perform a dry run on the publish step only." |
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.
very tiny style nit: i would prefer to format this so that it's on the same line, and just go back and indent the other flags slightly more:
--publish-dry-run | |
Perform a dry run on the publish step only." | |
--publish-dry-run Perform a dry run on the publish step only." |
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.
Done.
Improve the commit message added to release commits. It now includes a complete change log for the release being made. When the `console-api` version changes, it also needs to be changed in the crates that depend on it. The release script now does this via cargo update-version (from cargo-edit). Committing the `Cargo.lock` file after publishing has been moved to before adding the version tag to ensure that the correct commit is tagged. The change log is also updated in the amended commit so that the hash is correct. The cliff configuration file has also been updated to fix some incorrectly formatted commits.
40760b4
to
e2c3b12
Compare
3e4fb17
to
184b611
Compare
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
Improve the commit message added to release commits. It now includes a
complete change log for the release being made.
When the
console-api
version changes, it also needs to be changed inthe crates that depend on it. The release script now does this via cargo
update-version (from cargo-edit).
Committing the
Cargo.lock
file after publishing has been moved tobefore adding the version tag to ensure that the correct commit is
tagged. The change log is also updated in the amended commit so that the
hash is correct.
The cliff configuration file has also been updated to fix some
incorrectly formatted commits.