Skip to content
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: Add crate release helper scripts #825

Merged
merged 9 commits into from
Jul 12, 2024
Merged

Conversation

NickLarsenNZ
Copy link
Member

Description

Added script to help with release crates:

  • .scripts/verify_crate_versions.sh - used to ensure CHANGELOG.md versions match what is in Cargo.toml. Useful when creating a release PR.
  • .scripts/tag_and_push_release.sh - used after a release PR has been merged. It will fetch the origin, and tag each not yet tagged release to the selected commit, and optionally push the tags.

Tip

Should we add .scripts/verify_crate_versions.sh to the pre-commit hooks? This can save a lot of time and human error.

@NickLarsenNZ NickLarsenNZ changed the title chore: add crate release helper scripts chore: Add crate release helper scripts Jul 10, 2024
@NickLarsenNZ NickLarsenNZ self-assigned this Jul 10, 2024
@Techassi Techassi self-requested a review July 10, 2024 12:26
@Techassi
Copy link
Member

Do we maybe want to add shellcheck to the reviewdog workflow to make sure these scripts are valid?

@NickLarsenNZ
Copy link
Member Author

Do we maybe want to add shellcheck to the reviewdog workflow to make sure these scripts are valid?

Oh good point. I ran shellcheck across them first, so never realised it wasn't already a check.

Let me add it in this PR.

@Techassi
Copy link
Member

I'm also in favour of adding the .scripts/verify_crate_versions.sh script to the pre-commit config.

@NickLarsenNZ
Copy link
Member Author

I've added shellcheck to both reviewdog and pre-commit (copied from the docker-images repo), and added the verify_crate_versions.sh to the pre-commit config.

I have not added a pre-commit github action, so CI will not pickup mismatched versions (between Cargo.toml and CHANGELOG.md).

Would you like me to add that workflow in?

@Techassi
Copy link
Member

Would you like me to add that workflow in?

Tbh, I would keep it as is for now. I would rather invest more time in better tooling / improving the workflows (in the future).

@NickLarsenNZ
Copy link
Member Author

Tbh, I would keep it as is for now. I would rather invest more time in better tooling / improving the workflows (in the future).

I more meant pre-commit running in Github Actions (not so much this temporary script). Much is duplicated by review dog (same dilemma in docker-images).

Techassi
Techassi previously approved these changes Jul 10, 2024
@NickLarsenNZ NickLarsenNZ added this pull request to the merge queue Jul 10, 2024
@Techassi Techassi removed this pull request from the merge queue due to a manual request Jul 10, 2024
@Techassi
Copy link
Member

Tbh, I would keep it as is for now. I would rather invest more time in better tooling / improving the workflows (in the future).

I more meant pre-commit running in Github Actions (not so much this temporary script). Much is duplicated by review dog (same dilemma in docker-images).

Sure, let's add it. Shouldn't be much work anyway. We should keep in mind that much of that work will eventually be replaced (for example when moving this repo to it's own org).

@NickLarsenNZ
Copy link
Member Author

NickLarsenNZ commented Jul 10, 2024

Sure, let's add it. Shouldn't be much work anyway.

Added in 89e931b

We should keep in mind that much of that work will eventually be replaced (for example when moving this repo to it's own org).

Do you mean either reviewdog or pre-commit wouldn't be used anymore? At least the functionality those two provide will be needed in some capacity.

Side-note: I would be in favour of dropping reviewdog for pre-commit, since the latter can work locally and in CI (maybe reviewdog can too though).

@NickLarsenNZ NickLarsenNZ added this pull request to the merge queue Jul 12, 2024
Merged via the queue into main with commit c728e25 Jul 12, 2024
20 checks passed
@NickLarsenNZ NickLarsenNZ deleted the release-helper-scripts branch July 12, 2024 07:36
@Techassi
Copy link
Member

Do you mean either reviewdog or pre-commit wouldn't be used anymore? At least the functionality those two provide will be needed in some capacity.

No, they still will be used, but the workflows around it will probably change.

Side-note: I would be in favour of dropping reviewdog for pre-commit, since the latter can work locally and in CI (maybe reviewdog can too though).

Yeah, interesting idea. Worth exploring in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants