@norskvideo/ctl-dev-kit 0.2.121 → 0.2.122
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/refresh-ctl-pin.sh
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Repin the norsk-ctl daemon in flake.nix to a channel version. Resolves the
|
|
3
|
-
# version (default: the `
|
|
4
|
-
# sidecar, converts to SRI, and
|
|
5
|
-
#
|
|
3
|
+
# version (default: the `rc` channel, which the products' nightly bump
|
|
4
|
+
# follows), fetches each platform's sha256 sidecar, converts to SRI, and
|
|
5
|
+
# rewrites `ctlVersion` + the four `hash =` lines in flake.nix in place. Run
|
|
6
|
+
# from anywhere; targets the flake.nix beside it.
|
|
6
7
|
#
|
|
7
|
-
# refresh-ctl-pin.sh # pin to the current `
|
|
8
|
+
# refresh-ctl-pin.sh # pin to the current `rc`
|
|
8
9
|
# refresh-ctl-pin.sh 0.1.0-2026-07-27-... # pin to an explicit version
|
|
9
10
|
set -euo pipefail
|
|
10
11
|
|
|
@@ -12,7 +13,7 @@ here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
12
13
|
flake="$here/flake.nix"
|
|
13
14
|
base="https://s3.eu-west-1.amazonaws.com/norsk.video/norsk-ctl"
|
|
14
15
|
|
|
15
|
-
ver="${1:-$(curl -fsSL "$base/
|
|
16
|
+
ver="${1:-$(curl -fsSL "$base/rc")}"
|
|
16
17
|
echo "pinning norsk-ctl -> $ver"
|
|
17
18
|
|
|
18
19
|
declare -A plat=(
|
|
@@ -21,7 +21,7 @@ on:
|
|
|
21
21
|
schedule:
|
|
22
22
|
- cron: "17 4 * * *"
|
|
23
23
|
# Sent, through ci-workflows' fan-out, when something this repo pins is
|
|
24
|
-
# published (the norsk nightly, Studio's manifest pair, norsk-ctl
|
|
24
|
+
# published (the norsk nightly, Studio's manifest pair, norsk-ctl rc), so
|
|
25
25
|
# the pins move the same day rather than at the next 04:17. client_payload
|
|
26
26
|
# may name components; it defaults to the pins.
|
|
27
27
|
repository_dispatch:
|
|
@@ -285,7 +285,7 @@ jobs:
|
|
|
285
285
|
# Then every occurrence of the old string moves, lockfile aside --
|
|
286
286
|
# including the engine image ref the product's template launches. It also
|
|
287
287
|
# moves flake.nix's ctlVersion, the norsk-ctl the product's CI tiers run,
|
|
288
|
-
# to the `
|
|
288
|
+
# to the `rc` channel (ctl-pinned-in-repo.test.ts).
|
|
289
289
|
#
|
|
290
290
|
# A REFUSAL refuses the pins alone: the step says why and moves nothing,
|
|
291
291
|
# and the night's other components still reach their PR.
|
|
@@ -311,8 +311,8 @@ jobs:
|
|
|
311
311
|
ctl_base="https://s3.eu-west-1.amazonaws.com/norsk.video/norsk-ctl"
|
|
312
312
|
old_ctl="$( { grep -oE 'ctlVersion = "[^"]+"' flake.nix 2>/dev/null || true; } | head -1 | sed -E 's/.*"(.*)"/\1/')"
|
|
313
313
|
[ -n "$old_ctl" ] || refuse "flake.nix pins no ctlVersion. CI runs the norsk-ctl it names, so add ctlVersion = \"<version>\"; to flake.nix."
|
|
314
|
-
new_ctl="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$ctl_base/
|
|
315
|
-
[ -n "$new_ctl" ] || refuse "could not resolve norsk-ctl's
|
|
314
|
+
new_ctl="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$ctl_base/rc" || true)"
|
|
315
|
+
[ -n "$new_ctl" ] || refuse "could not resolve norsk-ctl's rc channel"
|
|
316
316
|
# An sdk-app's flake fetches no daemon, so normally no hashes; any
|
|
317
317
|
# platform it does fetch is resolved now, before anything moves.
|
|
318
318
|
declare -A ctl_sri=()
|
package/conventions/bump.yml
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
# 2. ctl-packages: the @norskvideo/ctl-* and moq-* family to npm `latest`;
|
|
7
7
|
# 3. pins: the engine and Studio image pair from the nightly entry of
|
|
8
8
|
# norsk-studio's channel manifest, and flake.nix's norsk-ctl pin to the
|
|
9
|
-
# `
|
|
9
|
+
# `rc` channel (hourly builds of main that passed ctl's release checks;
|
|
10
|
+
# `latest` moves only when ctl is blessed).
|
|
10
11
|
# Then ONE lockfile refresh across every install root, the quick gate (drift,
|
|
11
12
|
# lint, typecheck, unit), and ONE PR on bump/nightly, force-pushed, listing
|
|
12
13
|
# every component that moved, from and to, and anything refused, and why.
|
|
@@ -45,7 +46,7 @@ on:
|
|
|
45
46
|
schedule:
|
|
46
47
|
- cron: "17 4 * * *"
|
|
47
48
|
# Sent, through ci-workflows' fan-out, when something this repo pins is
|
|
48
|
-
# published (the norsk nightly, Studio's manifest pair, norsk-ctl
|
|
49
|
+
# published (the norsk nightly, Studio's manifest pair, norsk-ctl rc), so
|
|
49
50
|
# the pins move the same day rather than at the next 04:17. client_payload
|
|
50
51
|
# may name components; it defaults to the pins.
|
|
51
52
|
repository_dispatch:
|
|
@@ -301,7 +302,7 @@ jobs:
|
|
|
301
302
|
# PINS last: the {engine, studio image} pair from the nightly entry of
|
|
302
303
|
# norsk-studio's channel manifest -- the pair studio TESTED together --
|
|
303
304
|
# never from the two channels separately, plus flake.nix's norsk-ctl pin
|
|
304
|
-
# (ctlVersion + the per-platform hashes) to the `
|
|
305
|
+
# (ctlVersion + the per-platform hashes) to the `rc` channel. That pin
|
|
305
306
|
# is not dev-only: every CI tier runs the norsk-ctl it names, so a
|
|
306
307
|
# product's result belongs to a commit (ctl-pinned-in-repo.test.ts).
|
|
307
308
|
# Version discovery anchors on manifest.seed.json (the machine-writable
|
|
@@ -339,8 +340,8 @@ jobs:
|
|
|
339
340
|
ctl_base="https://s3.eu-west-1.amazonaws.com/norsk.video/norsk-ctl"
|
|
340
341
|
old_ctl="$( { grep -oE 'ctlVersion = "[^"]+"' flake.nix 2>/dev/null || true; } | head -1 | sed -E 's/.*"(.*)"/\1/')"
|
|
341
342
|
[ -n "$old_ctl" ] || refuse "flake.nix pins no ctlVersion. CI runs the norsk-ctl it names, so add ctlVersion = \"<version>\"; to flake.nix."
|
|
342
|
-
new_ctl="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$ctl_base/
|
|
343
|
-
[ -n "$new_ctl" ] || refuse "could not resolve norsk-ctl's
|
|
343
|
+
new_ctl="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$ctl_base/rc" || true)"
|
|
344
|
+
[ -n "$new_ctl" ] || refuse "could not resolve norsk-ctl's rc channel"
|
|
344
345
|
# The per-platform hash of each platform the flake fetches the daemon
|
|
345
346
|
# for (a Studio product's flake fetches all four; an sdk-app's none).
|
|
346
347
|
# Fetched now, not after the engine has moved: a missing sidecar used
|