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

feat: add build-time git info #5579

Open
wants to merge 2 commits into
base: feat/update-cargo-versions
Choose a base branch
from

Conversation

hstove
Copy link
Contributor

@hstove hstove commented Dec 16, 2024

While working on #5399, I noticed that we have a root-level build.rs file that gets git info, but we weren't using that.

Because 5399 introduces a build-time constants file, I figured I'd open this PR to also include Git info without needing to specify GIT_COMMIT and GIT_BRANCH ENV variables. This way, you always get the "full version string" regardless of how you run cargo build. This, along with 5399, means we can be rid of the unhelpful 0.0.1 version strings when people do custom builds.

I'm relatively ambivalent about this change - let me know what you think.

@hstove hstove requested a review from a team as a code owner December 16, 2024 23:29
stacks-common/build.rs Outdated Show resolved Hide resolved
stacks-common/build.rs Outdated Show resolved Hide resolved
stacks-common/build.rs Outdated Show resolved Hide resolved
stacks-common/build.rs Outdated Show resolved Hide resolved
stacks-common/build.rs Outdated Show resolved Hide resolved
stackslib/src/lib.rs Outdated Show resolved Hide resolved
@hstove
Copy link
Contributor Author

hstove commented Dec 20, 2024

Great suggestions @obycode and @jbencin ! Implemented.

Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

👍

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