节点在线、应用在线、配置在线使用令牌查询
大石头 authored at 2021-12-16 19:49:30
456.00 B
Stardust
use chrono::Utc;

fn main() {
    println!("cargo:rerun-if-changed=build.rs");
    println!("cargo:rerun-if-env-changed=STARAGENT_VERSION");

    let version =
        std::env::var("STARAGENT_VERSION").unwrap_or_else(|_| "1.0.2026.1017".to_string());
    let build_time = Utc::now().format("%Y-%m-%d %H:%M:%S").to_string();

    println!("cargo:rustc-env=STARAGENT_VERSION={version}");
    println!("cargo:rustc-env=STARAGENT_BUILD_TIME={build_time}");
}