commit 6b48596d330cf485ab9ab1209bef0104fff20374
parent 18f26649ee100dc11b2eceac4ee40b6e7d0b2891
Author: triesap <tyson@radroots.org>
Date: Sat, 6 Jun 2026 20:12:11 -0700
release: add Nix acceptance app
- expose release acceptance through the pinned Nix app surface
- document the Nix run and develop release commands
- guard the flake and validation wording for the acceptance entrypoint
- keep the repo-local release script as the command body
Diffstat:
2 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/crates/tangle/tests/release_acceptance.rs b/crates/tangle/tests/release_acceptance.rs
@@ -1,15 +1,11 @@
#![forbid(unsafe_code)]
use std::fs;
-use std::path::Path;
+use std::path::{Path, PathBuf};
#[test]
fn release_acceptance_script_covers_release_candidate_validation_ladder() {
- let script_path = Path::new(env!("CARGO_MANIFEST_DIR"))
- .parent()
- .and_then(Path::parent)
- .expect("workspace root")
- .join("scripts/release_acceptance.sh");
+ let script_path = workspace_root().join("scripts/release_acceptance.sh");
let script = fs::read_to_string(&script_path).expect("release acceptance script");
for required in [
@@ -59,3 +55,29 @@ fn release_acceptance_script_covers_release_candidate_validation_ladder() {
);
}
}
+
+#[test]
+fn nix_exposes_release_acceptance_entrypoint() {
+ let flake = read("flake.nix");
+
+ for required in [
+ "releaseAcceptance = mkScript pkgs \"tangle-release-acceptance\"",
+ "scripts/release_acceptance.sh",
+ "\"release-acceptance\"",
+ "program = \"${releaseAcceptance}/bin/tangle-release-acceptance\"",
+ ] {
+ assert!(flake.contains(required), "flake is missing `{required}`");
+ }
+}
+
+fn read(path: &str) -> String {
+ fs::read_to_string(workspace_root().join(path)).expect(path)
+}
+
+fn workspace_root() -> PathBuf {
+ Path::new(env!("CARGO_MANIFEST_DIR"))
+ .parent()
+ .and_then(Path::parent)
+ .expect("workspace root")
+ .to_path_buf()
+}
diff --git a/flake.nix b/flake.nix
@@ -69,6 +69,9 @@
${coverageEnvironment}
scripts/ci.sh
'';
+ releaseAcceptance = mkScript pkgs "tangle-release-acceptance" ''
+ scripts/release_acceptance.sh
+ '';
in
{
check = {
@@ -87,6 +90,10 @@
type = "app";
program = "${ci}/bin/tangle-ci";
};
+ "release-acceptance" = {
+ type = "app";
+ program = "${releaseAcceptance}/bin/tangle-release-acceptance";
+ };
}
);
};