@norskvideo/ctl-dev-kit 0.1.72 → 0.1.73
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/conventions/checks.yml +24 -6
- package/package.json +1 -1
package/conventions/checks.yml
CHANGED
|
@@ -78,16 +78,27 @@ jobs:
|
|
|
78
78
|
bun run docs:check
|
|
79
79
|
'
|
|
80
80
|
|
|
81
|
-
#
|
|
82
|
-
#
|
|
83
|
-
#
|
|
84
|
-
#
|
|
85
|
-
#
|
|
81
|
+
# The two halves of one licence guarantee, run together because they only
|
|
82
|
+
# work as a pair: check-template asserts this repo RECORDS the entitlement
|
|
83
|
+
# it needs, and check-product-name asserts it ASKS for the one it records.
|
|
84
|
+
#
|
|
85
|
+
# Either alone leaves them free to drift. funke-pegasus recorded
|
|
86
|
+
# funke-pegasus and asked for "norsk-studio" -- Studio's baked default,
|
|
87
|
+
# used whenever NORSK_PRODUCT_NAME is unset -- for its entire life. The
|
|
88
|
+
# template check was green throughout, because the template was never the
|
|
89
|
+
# wrong half. What that cost: the handshake was refused, so every media
|
|
90
|
+
# node was refused, so no SRT listener bound, while the instance reported
|
|
91
|
+
# healthy and Studio served its API. It reads as a broken workflow, and it
|
|
92
|
+
# took most of a day to find.
|
|
93
|
+
#
|
|
94
|
+
# PRODUCT_NAME is read ONCE and handed to both: two readings could
|
|
95
|
+
# disagree, and a lint that passes while naming the wrong product is worse
|
|
96
|
+
# than no lint. Cheap, no secrets, every PR.
|
|
86
97
|
#
|
|
87
98
|
# The image name is CI's own rule: PUBLISH_IMAGE when set, else the build
|
|
88
99
|
# script's IMAGE_TAG default, tag stripped -- a licence matches the repo
|
|
89
100
|
# part alone, never the tag.
|
|
90
|
-
- name: Check
|
|
101
|
+
- name: Check this repo records, and asks for, its own licence
|
|
91
102
|
run: |
|
|
92
103
|
set -euo pipefail
|
|
93
104
|
product="$(sed -nE 's/.*PRODUCT_NAME[[:space:]]*=[[:space:]]*"([^"]+)".*/\1/p' shared/src/version.ts | head -1)"
|
|
@@ -102,6 +113,13 @@ jobs:
|
|
|
102
113
|
nix develop .#build --command bun \
|
|
103
114
|
node_modules/@norskvideo/ctl-dev-kit/licence/check-template.ts \
|
|
104
115
|
licenseTemplate.json "$product" "$image"
|
|
116
|
+
# The compose the product renders is where the declaration has to be;
|
|
117
|
+
# the check exits 1 on an unreadable file rather than passing quietly,
|
|
118
|
+
# so a repo that moves this module fails here instead of silently
|
|
119
|
+
# dropping the gate.
|
|
120
|
+
nix develop .#build --command bun \
|
|
121
|
+
node_modules/@norskvideo/ctl-dev-kit/licence/check-product-name.ts \
|
|
122
|
+
shared/src/product-template.ts "$product"
|
|
105
123
|
|
|
106
124
|
# Report this pipeline's result to the aggregated product CI dashboard
|
|
107
125
|
# (id3as/ci-workflows) instead of posting its own pony — the dashboard renders
|