constellate 0.3.3

Constellation Portal is a Rust-based CLI that converts curated markdown collections (requirements, ADRs, audits, tasks) into a static, themeable knowledge portal.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::time::{SystemTime, UNIX_EPOCH};

fn main() {
    // Generate a build hash based on current timestamp
    let timestamp = SystemTime::now()
        .duration_since(UNIX_EPOCH)
        .expect("Time went backwards")
        .as_secs();

    // Create a short hash from timestamp (last 8 hex digits)
    let build_hash = format!("{:x}", timestamp).chars().rev().take(8).collect::<String>().chars().rev().collect::<String>();

    // Set as environment variable for compile time
    println!("cargo:rustc-env=BUILD_HASH={}", build_hash);

    // Rerun if build.rs changes
    println!("cargo:rerun-if-changed=build.rs");
}