From 639e1f1ba4a6afa5916490d633ed0e74a49a7403 Mon Sep 17 00:00:00 2001 From: kopackiw <26244440+kopackiw@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:32:57 +0100 Subject: [PATCH] Pass `RELEASE_DETECTED` as env for a compilation step --- .github/workflows/cd.yml | 2 ++ crates/fj/build.rs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7ea8c8e1e..e85e07662 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -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: | diff --git a/crates/fj/build.rs b/crates/fj/build.rs index 2c879dbd4..ec12d4477 100644 --- a/crates/fj/build.rs +++ b/crates/fj/build.rs @@ -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})"),