fix: modernize docker publishing

This commit is contained in:
2026-04-29 09:14:33 +00:00
parent 44ce9c8900
commit d694ada320
7 changed files with 330 additions and 45 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
node --input-type=module <<'NODE'
import fs from 'node:fs';
const readJson = (path) => JSON.parse(fs.readFileSync(path, 'utf8'));
const checks = {
packageVersion: readJson('/app/package.json').version,
interfacesVersion: readJson('/app/node_modules/@serve.zone/interfaces/package.json').version,
hasCli: fs.existsSync('/app/cli.js'),
};
await import('/app/dist_ts/index.js');
if (checks.packageVersion !== '1.0.186') {
throw new Error(`Unexpected Coretraffic package version ${checks.packageVersion}`);
}
if (checks.interfacesVersion !== '5.4.6') {
throw new Error(`Unexpected interfaces version ${checks.interfacesVersion}`);
}
if (!checks.hasCli) {
throw new Error('Missing cli.js');
}
console.log(JSON.stringify(checks));
NODE