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

Populate the version based on Git Describe #15400

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

afuller-TT
Copy link
Contributor

Ticket

None

Problem description

Prep work for packaging. We need to know our EXACT version. That means an up-to-date version string on every commit.

What's changed

Added a helper function that parses git describe
Integrated export-subst to obtain version information after generating a tarball of the repo

Checklist

  • Post commit CI passes
  • Blackhole Post commit (if applicable)
  • Model regression CI testing passes (if applicable)
  • Device performance regression CI testing passes (if applicable)
  • New/Existing tests provide coverage for changes

Comment on lines +8 to +12
# These will be filled in by `git archive`.
# Building the source outside of git from something that was not exported via `git archive`
# is left as an exercise to whoever is wanting to do that.
set(fallbackVersion "$Format:%(describe)$")
set(fallbackHash "$Format:%h$")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here's what this file looks like after it get tarball'd:

image

For Gitless builds, the version is the git describe of the commit that generated the archive.
Copy link
Contributor

@blozano-tt blozano-tt left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

2 participants