build(rust): configure cargo cross to passthrough GITHUB_SHA (#7410)

Our relays aren't semver-versioned like other components. So for the
version reported to Sentry, we use the current Git SHA. This one is only
available as an ENV variable because we are building within a docker
container using `cargo cross`. By default, no env variables are passed
through to the container. To fix this, we need to add a configuration
file that explicitly opts-in to the necessary ENV variable.
This commit is contained in:
Thomas Eizinger
2024-11-28 22:58:59 +00:00
committed by GitHub
parent d41c3afb0b
commit c7d46b475e

2
rust/Cross.toml Normal file
View File

@@ -0,0 +1,2 @@
[build.env]
passthrough = ["GITHUB_SHA"] # Allows binaries to embed the current SHA on CI.