From c4f54d9fa732222b2f29836e30ae4deb3ed11a7d Mon Sep 17 00:00:00 2001 From: Jochen Maes Date: Tue, 31 Oct 2023 06:41:46 +0100 Subject: [PATCH] pass version with the build Signed-off-by: Jochen Maes --- .drone.yml | 4 ++-- Cargo.lock | 2 +- Cargo.toml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 74c4750..5356761 100644 --- a/.drone.yml +++ b/.drone.yml @@ -24,8 +24,8 @@ steps: - apk add --no-cache musl-dev gcc-aarch64-none-elf - rustup target add x86_64-unknown-linux-musl - rustup target add aarch64-unknown-linux-musl - - cargo build --target x86_64-unknown-linux-musl --bins -r - - cargo rustc --target aarch64-unknown-linux-musl --bins -r -- -C linker=aarch64-none-elf-gcc + - cargo build --target x86_64-unknown-linux-musl --bins -r --config 'package.version="${DRONE_TAG##v}"' + - RUSTC_LINKER=aarch64-none-elf-gcc cargo build --target aarch64-unknown-linux-musl --bins -r --config 'package.version="{$DRONE_TAG##v}"' - cp target/x86_64-unknown-linux-musl/release/mouse /artifacts/mouse-amd64 - cp target/aarch64-unknown-linux-musl/release/mouse /artifacts/mouse-arm64 volumes: diff --git a/Cargo.lock b/Cargo.lock index 477125d..32388a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -159,7 +159,7 @@ checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "mouse" -version = "0.1.0" +version = "0.0.0" dependencies = [ "clap", "csv", diff --git a/Cargo.toml b/Cargo.toml index 5526f7b..cf61be2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,8 @@ name = "mouse" authors = ["Jochen Maes "] description = "Information gatherer for systems." -version = "0.1.0" +# this will be overwritten during builds! so ignore +version = "0.0.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html