Make it possible to override values in Cargo.toml from external source #7554
Labels
A-manifest
Area: Cargo.toml issues
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Uh oh!
There was an error while loading. Please reload this page.
Describe the problem you are trying to solve
I wish to be able to set cargo package version from an external source. Maybe I'm ignorant but I could not figure out how to do this.
My use case is to correlate artifacts built with CI to specific commits. These artifacts I typically store for a longer period of time.
Example of a custom version would be running
git describe --always --dirty --abbrev=7 --tags
which could result in something like1.0.0-RC1-10-g0a51bc6
(ten commits since git tag1.0.0-RC1
with hashg0a51bc6
).Describe the solution you'd like
I would have expected to be able to do something like
println!("cargo:package-version={}", myCustomVersion);
inbuild.rs
. Being able to override values inCargo.toml
I assume is a general use case.The text was updated successfully, but these errors were encountered: