rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood56d76c228e79dbecc92d836839e524f242adf587
{
"request": "trigger",
"version": 1,
"event_type": "patch",
"repository": {
"id": "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5",
"name": "heartwood",
"description": "Radicle Heartwood Protocol & Stack",
"private": false,
"default_branch": "master",
"delegates": [
"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT",
"did:key:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Created",
"patch": {
"id": "96721c9357e528c50c037d704f3affe26fe46f3e",
"author": {
"id": "did:key:z6Mkgfwr3p56v3hg1qwZaVj5UHYoaVEQoVWV23mo2iFFBYQp",
"alias": "spacefrogg"
},
"title": "flake: Compile commit hash into program version",
"state": {
"status": "merged",
"conflicts": []
},
"before": "137961c1f72a6850325b05e65a232cd202cbd12c",
"after": "56d76c228e79dbecc92d836839e524f242adf587",
"commits": [
"56d76c228e79dbecc92d836839e524f242adf587"
],
"target": "6cfed884bf37cba1e0d8e97fa8b0e94df4a04b1f",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "96721c9357e528c50c037d704f3affe26fe46f3e",
"author": {
"id": "did:key:z6Mkgfwr3p56v3hg1qwZaVj5UHYoaVEQoVWV23mo2iFFBYQp",
"alias": "spacefrogg"
},
"description": "Changes build.rs to take the GIT_HASH environment variable into account\nif `git rev-parse` is unable to determine the current commit hash.",
"base": "137961c1f72a6850325b05e65a232cd202cbd12c",
"oid": "56d76c228e79dbecc92d836839e524f242adf587",
"timestamp": 1707389674
},
{
"id": "8de3fc5598b220ed5718ebf5b58dd5936c20cbbd",
"author": {
"id": "did:key:z6Mkgfwr3p56v3hg1qwZaVj5UHYoaVEQoVWV23mo2iFFBYQp",
"alias": "spacefrogg"
},
"description": "Rebase.",
"base": "fb13e5f970f7712fe904351ea2812253000d73c6",
"oid": "4b1ca18d0ca0f951d926a5c048f0365d740420f1",
"timestamp": 1709937473
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "5faae070-ada2-4412-a6c4-7358c4f6261e"
},
"info_url": "https://cci.rad.levitte.org//5faae070-ada2-4412-a6c4-7358c4f6261e.html"
}
Started at: 2025-10-21 17:36:51.139503+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW added
✓ Remote-tracking branch cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW/master created for z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz added
✓ Remote-tracking branch erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz/master created for z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz
✓ Remote lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz added
✓ Remote-tracking branch lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz/master created for z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz
✓ Repository successfully cloned under /opt/radcis/ci.rad.levitte.org/cci/state/5faae070-ada2-4412-a6c4-7358c4f6261e/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 125 issues · 15 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout 96721c9357e528c50c037d704f3affe26fe46f3e
✓ Switched to branch patch/96721c9 at revision 96721c9
✓ Branch patch/96721c9 setup to track rad/patches/96721c9357e528c50c037d704f3affe26fe46f3e
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 56d76c228e79dbecc92d836839e524f242adf587
HEAD is now at 56d76c22 flake: Compile commit hash into program version
Exit code: 0
$ git show 56d76c228e79dbecc92d836839e524f242adf587
commit 56d76c228e79dbecc92d836839e524f242adf587
Author: Michael Raitza <michael.raitza@tu-dresden.de>
Date: Thu Feb 8 11:37:49 2024 +0100
flake: Compile commit hash into program version
Changes build.rs to take the GIT_HASH environment variable into account
if `git rev-parse` is unable to determine the current commit hash.
diff --git a/build.rs b/build.rs
index ddda179f..63391336 100644
--- a/build.rs
+++ b/build.rs
@@ -1,4 +1,5 @@
use std::process::Command;
+use std::env;
fn main() {
// Set a build-time `GIT_HEAD` env var which includes the commit id;
@@ -16,7 +17,7 @@ fn main() {
None
}
})
- .unwrap_or_else(|| String::from("unknown"));
+ .unwrap_or(env::var("GIT_HEAD").unwrap_or("unknown".into()));
println!("cargo:rustc-env=GIT_HEAD={hash}");
println!("cargo:rustc-rerun-if-changed=.git/HEAD");
diff --git a/flake.nix b/flake.nix
index 927cfc6a..836859d0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -77,6 +77,9 @@
# Additional darwin specific inputs can be set here
pkgs.libiconv
];
+ preBuild = lib.optionalString (self.shortRev or null != null) ''
+ export GIT_HEAD=${self.shortRev}
+ '';
};
# Build *just* the cargo dependencies, so we can reuse
Exit code: 0
shell: 'cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny clippy::all cargo build --all-targets --workspace cargo doc --workspace cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name 5faae070-ada2-4412-a6c4-7358c4f6261e -v /opt/radcis/ci.rad.levitte.org/cci/state/5faae070-ada2-4412-a6c4-7358c4f6261e/s:/5faae070-ada2-4412-a6c4-7358c4f6261e/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/5faae070-ada2-4412-a6c4-7358c4f6261e/w:/5faae070-ada2-4412-a6c4-7358c4f6261e/w -w /5faae070-ada2-4412-a6c4-7358c4f6261e/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:bookworm bash /5faae070-ada2-4412-a6c4-7358c4f6261e/s/script.sh
+ cargo --version
info: syncing channel updates for '1.74-x86_64-unknown-linux-gnu'
info: latest update on 2023-12-07, rust version 1.74.1 (a28077b28 2023-12-04)
info: downloading component 'cargo'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-std'
info: installing component 'rustc'
cargo 1.74.1 (ecb9851af 2023-10-18)
+ rustc --version
rustc 1.74.1 (a28077b28 2023-12-04)
+ cargo fmt --check
error: 'cargo-fmt' is not installed for the toolchain '1.74-x86_64-unknown-linux-gnu'.
To install, run `rustup component add --toolchain 1.74-x86_64-unknown-linux-gnu rustfmt`
Exit code: 1
{
"response": "finished",
"result": "failure"
}