-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cargo package version from git tag #12144
Comments
Thanks for the proposal. As I understand it, The other questions come up to my mind:
Sorry for posting a lot of questions. This change looks quite large to me. I think perhaps we should start from drafting a pre-RFC first in Rust internal forum. For example, this pre-RFC also proposes a huge change but is pretty well-written. I'd suggest doing a similar one for this proposal. Footnotes |
Sorry I shouldn't only talk about implementation aspect. Let's step back a bit, looking into the problem you want to resolve. Drop some more questions here:
|
Thanks for your prompt reply. I will try to answer all your questions and to give more info about the flow during next weeks |
See also #6583 |
I'm often struggling in this domain too. I use git for version control, but Cargo expects me to use Some of the pains points are:
Of course, is some situations there is not git metadata available (e.g. when using |
See the recent change making |
#6583 explores a dynamically set version. While the original title is focused on using the command-line, the discussion has branched out to general dynamic version handling. I'm going to close in favor of that so we consider the problem holistically rather than trying to evaluate the problem from multiple different angles. |
Problem
I find very useful to inject the package version from git tags, without have to specify it in a file.
When using python, I use setuptools-scm, that, as they say, extracts Python package versions from git or hg metadata instead of declaring them as the version argument or in a SCM managed file.
I believe this is very helpful and useful in CI/CD
Proposed Solution
To have a better understanding, let's make an example.
When I open a repo, I tag the branch to
0.0.1
, then every commit I do, the version increases, showing the commits distance from the previous version, that is detected using the git tag. Then after 50 commits, I'll have version0.0.1-dev50
.When a patch is ready, the branch is tagged as
0.0.2
and the counting restarts.Notes
I'll love to contribute to achieve this feature, but I really don't have a clue where to start
The text was updated successfully, but these errors were encountered: