-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
A-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-rfcStatus: Needs an RFC to make progress.Status: Needs an RFC to make progress.
Description
Maintainer notes
- For one approach to tracking a marketing version, see Possibility to set the package version dynamically #6583 (comment)
- Version field is now optional (feat(toml): Allow version-less manifests #12786)
- For a CLI to edit
package.version
, see https://github.com/killercup/cargo-edit - For dynamic version design considerations, see Possibility to set the package version dynamically #6583 (comment)
Hello
I'm building a rust application using internal teamcity CI job. I want the build number to be part of the version of the binary (so eg. ./app --version
knows from which build it came).
The only way I found so far is to let the build first edit the Cargo.toml
(sed -i -e 's/^version = .*/version = "%build.version%"/' Cargo.toml
), which seems ugly and fragile.
It would be great if I could somehow override the version from Cargo.toml
through the command line ‒ either as a parameter or an environment variable.
Would something like that make sense? Are there plans to support it?
keirlawson, nicoulaj, jcornaz, zhyuri, avantgardnerio and 83 more
Metadata
Metadata
Assignees
Labels
A-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-rfcStatus: Needs an RFC to make progress.Status: Needs an RFC to make progress.