Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T01:45:41.847Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

build.rs

35 lines · 1.1 KB · rust
1#![allow(clippy::disallowed_methods, reason = "build scripts are exempt")]
2use std::process::Command;
3
4const ZED_MANIFEST: &str = include_str!("../zed/Cargo.toml");
5
6fn main() {
7    let zed_cargo_toml: cargo_toml::Manifest =
8        toml::from_str(ZED_MANIFEST).expect("failed to parse zed Cargo.toml");
9    println!(
10        "cargo:rustc-env=ZED_PKG_VERSION={}",
11        zed_cargo_toml.package.unwrap().version.unwrap()
12    );
13    println!(
14        "cargo:rustc-env=TARGET={}",
15        std::env::var("TARGET").unwrap()
16    );
17
18    // Populate git sha environment variable if git is available
19    println!("cargo:rerun-if-changed=../../.git/logs/HEAD");
20    if let Some(output) = Command::new("git")
21        .args(["rev-parse", "HEAD"])
22        .output()
23        .ok()
24        .filter(|output| output.status.success())
25    {
26        let git_sha = String::from_utf8_lossy(&output.stdout);
27        let git_sha = git_sha.trim();
28
29        println!("cargo:rustc-env=ZED_COMMIT_SHA={git_sha}");
30    }
31    if let Some(build_identifier) = option_env!("GITHUB_RUN_NUMBER") {
32        println!("cargo:rustc-env=ZED_BUILD_ID={build_identifier}");
33    }
34}
35
Served at tenant.openagents/omega Member data and write actions are omitted.