web/website/node/release-identity.mjs
2026-11-21 20:22:37 +01:00

5 lines
331 B
JavaScript

// The production builder may rebuild outside Actions. Identify the immutable
// serving release rather than relying only on the CI build environment.
export function releaseCommitFromModuleUrl(value){
try{return new URL(value).pathname.match(/\/releases\/ci-([0-9a-f]{40})\/node\/server\.mjs$/)?.[1]||null;}catch{return null;}
}