@norskvideo/ctl-dev-kit 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/flake.nix +5 -5
- package/conventions/check-drift.ts +18 -6
- package/package.json +1 -1
package/build/flake.nix
CHANGED
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
|
|
31
31
|
# --- norsk-ctl channel pin -------------------------------------------
|
|
32
32
|
# The released daemon, one build per platform. Bump these together.
|
|
33
|
-
ctlVersion = "0.1.0-2026-07-
|
|
33
|
+
ctlVersion = "0.1.0-2026-07-29-a968793";
|
|
34
34
|
ctlBase = "https://s3.eu-west-1.amazonaws.com/norsk.video/norsk-ctl";
|
|
35
35
|
ctlAsset = {
|
|
36
|
-
"x86_64-linux" = { plat = "linux-x64"; hash = "sha256-
|
|
37
|
-
"aarch64-linux" = { plat = "linux-arm64"; hash = "sha256-
|
|
38
|
-
"aarch64-darwin" = { plat = "darwin-arm64"; hash = "sha256-
|
|
39
|
-
"x86_64-darwin" = { plat = "darwin-x64"; hash = "sha256-
|
|
36
|
+
"x86_64-linux" = { plat = "linux-x64"; hash = "sha256-F2F1iX4V10mB4n72qIMknHoCohOeiLCLB20BQJtuGU4="; };
|
|
37
|
+
"aarch64-linux" = { plat = "linux-arm64"; hash = "sha256-Qnc8xsAm2r1XWAWIBYWPcUKn/Q+Xxs9kdwLq1fubb6M="; };
|
|
38
|
+
"aarch64-darwin" = { plat = "darwin-arm64"; hash = "sha256-u7kAbgpmAVgpPXBgsEDiVGzLxwfZZDoZgqw2j9NwQeg="; };
|
|
39
|
+
"x86_64-darwin" = { plat = "darwin-x64"; hash = "sha256-cTgyuZD/W/6dVXTd1/17KIbks3FmBVOOntqoMoJwZ7s="; };
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
mkCtl = system:
|
|
@@ -54,6 +54,22 @@ function workflowProblem(actual: string, canonical: string): string | undefined
|
|
|
54
54
|
return undefined;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
// The dev-only ctl pin the nightly bumps in each repo's flake: the version
|
|
58
|
+
// string and the four per-platform source hashes. CI downloads ctl directly, so
|
|
59
|
+
// this pin only feeds the dev flake; it floats per repo and over time and is NOT
|
|
60
|
+
// a shared convention. Mask it so the gate compares flake STRUCTURE, not the pin
|
|
61
|
+
// — same idea as masking upgrade-latest's product: line.
|
|
62
|
+
const CTL_VERSION_LINE = /ctlVersion = "[^"]*";/;
|
|
63
|
+
const CTL_HASH_LINE = /hash = "sha256-[^"]*";/g;
|
|
64
|
+
|
|
65
|
+
function flakeProblem(actual: string, canonical: string): string | undefined {
|
|
66
|
+
const mask = (s: string) =>
|
|
67
|
+
s.replace(CTL_VERSION_LINE, 'ctlVersion = "__CTL__";').replace(CTL_HASH_LINE, 'hash = "sha256-__HASH__";');
|
|
68
|
+
const [ma, mc] = [mask(actual), mask(canonical)];
|
|
69
|
+
if (ma === mc) return undefined;
|
|
70
|
+
return `flake.nix has drifted from @norskvideo/ctl-dev-kit build/flake.nix (${firstDiffLine(ma, mc)}). ${RESYNC}`;
|
|
71
|
+
}
|
|
72
|
+
|
|
57
73
|
function coreProblem(claude: string, canonicalCore: string): string | undefined {
|
|
58
74
|
if (claude.includes(canonicalCore)) return undefined;
|
|
59
75
|
|
|
@@ -86,12 +102,8 @@ export function checkDrift(
|
|
|
86
102
|
`flake.nix not found at repo root (${flakePath}). It is copied verbatim from @norskvideo/ctl-dev-kit build/flake.nix.`,
|
|
87
103
|
);
|
|
88
104
|
} else {
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
91
|
-
problems.push(
|
|
92
|
-
`flake.nix has drifted from @norskvideo/ctl-dev-kit build/flake.nix (${firstDiffLine(flake, canonical.flake)}). ${RESYNC}`,
|
|
93
|
-
);
|
|
94
|
-
}
|
|
105
|
+
const problem = flakeProblem(readFileSync(flakePath, "utf8"), canonical.flake);
|
|
106
|
+
if (problem) problems.push(problem);
|
|
95
107
|
}
|
|
96
108
|
|
|
97
109
|
// upgrade-latest.yml is OPTIONAL — a product may ship without a nightly bump
|