Files
convertis/plugin-build.rs
T
Elias Wendland eb76ed1937
Release / check-release (push) Successful in 17s
Release / build (push) Skipped
Release / package (deb) (push) Skipped
Release / package (rpm) (push) Skipped
Release / publish (push) Skipped
CI / test (push) Failing after 2m6s
refactor: restructure project into a workspace by introducing a plugin API crate and modularizing individual plugin definitions.
2026-07-17 15:50:50 +02:00

30 lines
1.2 KiB
Rust

// Copyright (C) 2026 Elias Wendland <eliaswendland@pm.me>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 3 exclusively.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use std::process::Command;
fn main() {
let rustc = std::env::var("RUSTC").unwrap_or_else(|_| "rustc".to_owned());
let version = Command::new(rustc)
.arg("--version")
.output()
.ok()
.filter(|output| output.status.success())
.map(|output| String::from_utf8_lossy(&output.stdout).trim().to_owned())
.unwrap_or_else(|| "unknown".to_owned());
let target = std::env::var("TARGET").unwrap_or_else(|_| "unknown".to_owned());
println!("cargo:rustc-env=CONVERTIS_RUSTC_VERSION={version}");
println!("cargo:rustc-env=CONVERTIS_TARGET={target}");
}