diff options
| author | Fuwn <[email protected]> | 2022-03-17 02:31:14 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-03-17 02:31:14 -0700 |
| commit | f5a8602748eff4bafea5fd37ffc270f7892c19c8 (patch) | |
| tree | 7b9dc9b9188a5f967ac19919926f8f3b1b0d86ef | |
| parent | feat: 0.1.0 :star: (diff) | |
| download | cli-f5a8602748eff4bafea5fd37ffc270f7892c19c8.tar.xz cli-f5a8602748eff4bafea5fd37ffc270f7892c19c8.zip | |
fix(build): remove vergen
| -rw-r--r-- | Cargo.toml | 7 | ||||
| -rw-r--r-- | build.rs | 7 | ||||
| -rw-r--r-- | src/main.rs | 7 |
3 files changed, 9 insertions, 12 deletions
@@ -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" @@ -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) |