Skip to content

Commit 8f32a58

Browse files
committed
fix: make portal workflow export cross-platform
1 parent c5141b3 commit 8f32a58

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

scripts/build-portal-workflows.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import { dirname, resolve } from 'node:path';
33
import { fileURLToPath } from 'node:url';
44

55
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
6-
const template = readFileSync(resolve(root, 'portal', 'portal-template.html'), 'utf8');
6+
// Keep the generated JSON byte-stable on Windows and Linux. Without this,
7+
// the embedded HTML inherited the checkout's line endings and CI rebuilt a
8+
// different export from the exact same source.
9+
const template = readFileSync(resolve(root, 'portal', 'portal-template.html'), 'utf8').replace(/\r\n?/g, '\n');
710
const output = resolve(root, 'workflows');
811
mkdirSync(output, { recursive: true });
912

0 commit comments

Comments
 (0)