Pass `RELEASE_DETECTED` as env for a compilation step

This commit is contained in:
kopackiw 2022-11-08 15:32:57 +01:00
parent 60b4992cc6
commit 639e1f1ba4
2 changed files with 4 additions and 2 deletions

View File

@ -67,6 +67,8 @@ jobs:
- name: Binaries | Compile
run: cargo build --release --target ${{ matrix.target }}
env:
RELEASE_DETECTED: ${{ needs.calculate-release-flags.outputs.release-detected }}
- name: Binaries | Prepare upload
run: |

View File

@ -23,8 +23,8 @@ impl Version {
let commit = git_description();
let official_release =
std::env::var("release-detected").as_deref() == Ok("true");
println!("cargo:rerun-if-env-changed=release-detected");
std::env::var("RELEASE_DETECTED").as_deref() == Ok("true");
println!("cargo:rerun-if-env-changed=RELEASE_DETECTED");
let full_string = match (commit, official_release) {
(Some(commit), true) => format!("{pkg_version} ({commit})"),