aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml7
-rw-r--r--build.rs7
-rw-r--r--src/main.rs7
3 files changed, 9 insertions, 12 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 705d216..aa43a21 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,13 +25,6 @@ codegen-units = 1
# Optimize for size
opt-level = "s"
-[build-dependencies]
-# Build variables
-vergen = "7.0.0"
-
-# `Result`
-anyhow = "1.0.56"
-
[dependencies]
# CLI
clap = "3.1.6"
diff --git a/build.rs b/build.rs
index 5512a66..bf80569 100644
--- a/build.rs
+++ b/build.rs
@@ -16,4 +16,9 @@
// Copyright (C) 2022-2022 Fuwn <[email protected]>
// SPDX-License-Identifier: GPL-3.0-only
-fn main() -> anyhow::Result<()> { vergen::vergen(vergen::Config::default()) }
+use std::env::var;
+
+fn main() {
+ println!("cargo:rustc-env=TARGET={}", var("TARGET").unwrap());
+ println!("cargo:rustc-env=PROFILE={}", var("PROFILE").unwrap());
+}
diff --git a/src/main.rs b/src/main.rs
index 96513f6..8321019 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -25,11 +25,10 @@ use crate::export::Exporter;
fn main() {
let matches = clap::Command::new(env!("CARGO_PKG_NAME"))
.version(&*format!(
- "{}(1)-{}-({})-{}",
+ "{}(1)-{}-({})",
env!("CARGO_PKG_VERSION"),
- env!("VERGEN_CARGO_PROFILE"),
- env!("VERGEN_CARGO_TARGET_TRIPLE"),
- env!("VERGEN_GIT_SHA").get(0..7).unwrap(),
+ env!("PROFILE"),
+ env!("TARGET"),
))
.author(env!("CARGO_PKG_AUTHORS"))
.subcommand_required(true)