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

Handle version directly in release action #43

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

gnalh
Copy link
Contributor

@gnalh gnalh commented Mar 27, 2024

We've had a few instances where we forgot to update the release version. Let's just handle it entirely in the release and leave local as 0.0.0.

Copy link

trunk-staging-io bot commented Mar 27, 2024

💊 0 quarantined ✅ 10 passed 🕐 10 new ⋅ (learn more)

docs ⋅ learn more about trunk.io

@gnalh gnalh force-pushed the gabe/move-version-into-release branch from 8087030 to 347ae71 Compare March 27, 2024 20:06
@gnalh gnalh marked this pull request as ready for review March 27, 2024 20:06
@@ -1,7 +1,7 @@
[package]
name = "trunk-analytics-cli"
edition = "2021"
version = "0.5.2"
version = "0.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

will we need to update the uploader accordingly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, the version is overwritten by the action on release.

@gnalh gnalh requested a review from zaycev March 28, 2024 16:56
Comment on lines +25 to +29
- name: Update version
run: |
export VERSION=${{ github.event.inputs.release_tag }}
sed -i "s/0.0.0/$VERSION/g" Cargo.toml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is where the magic happens. It overwrites the release version with the one tagged by the pipeline.

@gnalh gnalh merged commit a1ebb81 into main Apr 3, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants