diff --git a/.github/workflows/fix-release-check-v1770.yml b/.github/workflows/fix-release-check-v1770.yml new file mode 100644 index 0000000..f7b1565 --- /dev/null +++ b/.github/workflows/fix-release-check-v1770.yml @@ -0,0 +1,44 @@ +name: Fix v17.7.0 release checks + +on: + push: + branches: + - feature/v17.7.0-architecture-foundation + paths: + - .github/workflows/fix-release-check-v1770.yml + +permissions: + contents: write + +jobs: + fix: + if: github.actor != 'github-actions[bot]' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Update release checks + run: | + node <<'NODE' + const fs=require('fs'); + const f='tests/release-check.mjs';let s=fs.readFileSync(f,'utf8'); + const repl=(a,b,label)=>{if(!s.includes(a))throw new Error(label+' not found');s=s.replace(a,b)}; + repl("check(sw.includes('v74-20260908-v17-6-9-offer-pdf-tabs-gallery')&&sw.includes('classic-offer-pdf-v1767.js')&&sw.includes('developer-console-v1768.js')&&sw.includes('offer-workspace-v1769.js'),'service worker cache is v17.6.9');","check(sw.includes('v75-20260908-v17-7-0-architecture-foundation')&&sw.includes('data-layer-v1770.js')&&sw.includes('server-automation-v1770.js')&&sw.includes('offer-workspace-v1769.js'),'service worker cache is v17.7.0');",'sw'); + repl("check(index.includes('20260908-v17-6-9-offer-pdf-tabs-gallery')&&index.includes('classic-offer-pdf-v1767.js')&&!index.includes('20260907-v17-6-0-stability-security'),'index cache-busting points to v17.6.9');","check(index.includes('20260908-v17-7-0-architecture-foundation')&&index.includes('classic-offer-pdf-v1767.js')&&!index.includes('20260907-v17-6-0-stability-security'),'index cache-busting points to v17.7.0');",'index'); + repl("check(String(releaseManifest.pwaCache||'').includes('v74-20260908-v17-6-9-offer-pdf-tabs-gallery'),'release manifest points to current PWA cache');","check(String(releaseManifest.pwaCache||'').includes('v75-20260908-v17-7-0-architecture-foundation'),'release manifest points to current PWA cache');",'manifest'); + repl("check(['17.6.2','17.6.3','17.6.4','17.6.5','17.6.6','17.6.7','17.6.8','17.6.9'].every(v=>fs.existsSync(path.join(root,`docs/releases/V${v}-CHANGES.txt`))),'release notes exist through v17.6.9');","check(['17.6.2','17.6.3','17.6.4','17.6.5','17.6.6','17.6.7','17.6.8','17.6.9','17.7.0'].every(v=>fs.existsSync(path.join(root,`docs/releases/V${v}-CHANGES.txt`))),'release notes exist through v17.7.0');",'notes'); + repl("check(runtime.includes(\"const VERSION = '17.6.5'\")&&runtime.includes('ERROR_DEDUPE_MS=5*60*1000')&&runtime.includes('mirrorBusy=false')&&runtime.includes('backupBusy=false'),'stability logger uses current version, dedupe and single-flight guards');","check(runtime.includes(\"const VERSION = '17.7.0'\")&&runtime.includes('ERROR_DEDUPE_MS=5*60*1000')&&runtime.includes('mirrorBusy=false')&&runtime.includes('backupBusy=false'),'stability logger uses current version, dedupe and single-flight guards');",'logger'); + repl("check(pkg.version==='17.6.9','package version is v17.6.9');","check(pkg.version==='17.7.0','package version is v17.7.0');",'pkg'); + s=s.replace("if(bad)process.exit(1);\n\ncheck(pkg.version==='17.7.0','package version is v17.7.0');","check(pkg.version==='17.7.0','package version is v17.7.0');"); + if(!s.trimEnd().endsWith('if(bad)process.exit(1);'))s=s.trimEnd()+"\nif(bad)process.exit(1);\n"; + fs.writeFileSync(f,s); + NODE + - name: Commit + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add tests/release-check.mjs + git commit -m "Update v17.7.0 release checks" + git push