Open
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?