fix: modernize docker publishing

This commit is contained in:
2026-04-29 09:14:10 +00:00
parent 578e804306
commit 8a26f1cbba
7 changed files with 301 additions and 157 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/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,
apiVersion: readJson('/app/node_modules/@serve.zone/api/package.json').version,
hasCli: fs.existsSync('/app/cli.js'),
};
await import('/app/dist_ts/index.js');
if (checks.packageVersion !== '1.1.0') {
throw new Error(`Unexpected Coreflow package version ${checks.packageVersion}`);
}
if (checks.interfacesVersion !== '5.4.6') {
throw new Error(`Unexpected interfaces version ${checks.interfacesVersion}`);
}
if (checks.apiVersion !== '5.3.4') {
throw new Error(`Unexpected api version ${checks.apiVersion}`);
}
if (!checks.hasCli) {
throw new Error('Missing cli.js');
}
console.log(JSON.stringify(checks));
NODE