From 3654e618437ee39fe2f378d66aba444ad2387497 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Wed, 2 Oct 2024 22:48:33 -0400 Subject: [PATCH 1/2] Fix `cargo:version_number` - has only one `:` See [openssl code](https://github.com/sfackler/rust-openssl/blob/8d60e211460122768a1deab0549e35577a52dbeb/openssl-sys/build/main.rs#L392): ```rust let openssl_version = openssl_version.unwrap(); println!("cargo:version_number={:x}", openssl_version); if openssl_version >= 0x4_00_00_00_0 { ... ``` --- src/doc/src/reference/build-script-examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/reference/build-script-examples.md b/src/doc/src/reference/build-script-examples.md index e5bdaa3c19b..728f8cf113d 100644 --- a/src/doc/src/reference/build-script-examples.md +++ b/src/doc/src/reference/build-script-examples.md @@ -440,7 +440,7 @@ script looks something [like this](https://github.com/sfackler/rust-openssl/blob/dc72a8e2c429e46c275e528b61a733a66e7877fc/openssl-sys/build/main.rs#L216): ```rust,ignore -println!("cargo::version_number={:x}", openssl_version); +println!("cargo:version_number={openssl_version:x}"); ``` This instruction causes the `DEP_OPENSSL_VERSION_NUMBER` environment variable From f64f11d518e15bcb6167d31aaaaf561f09dc36be Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Wed, 2 Oct 2024 23:59:40 -0400 Subject: [PATCH 2/2] Update src/doc/src/reference/build-script-examples.md Co-authored-by: Weihang Lo --- src/doc/src/reference/build-script-examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/reference/build-script-examples.md b/src/doc/src/reference/build-script-examples.md index 728f8cf113d..9b7464134ce 100644 --- a/src/doc/src/reference/build-script-examples.md +++ b/src/doc/src/reference/build-script-examples.md @@ -440,7 +440,7 @@ script looks something [like this](https://github.com/sfackler/rust-openssl/blob/dc72a8e2c429e46c275e528b61a733a66e7877fc/openssl-sys/build/main.rs#L216): ```rust,ignore -println!("cargo:version_number={openssl_version:x}"); +println!("cargo::metadata=version_number={openssl_version:x}"); ``` This instruction causes the `DEP_OPENSSL_VERSION_NUMBER` environment variable