fix: modernize docker publishing
This commit is contained in:
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/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,
|
||||
hasCli: fs.existsSync('/app/cli.js'),
|
||||
hasIndex: fs.existsSync('/app/dist_ts/index.js'),
|
||||
hasRendertronClass: fs.existsSync('/app/dist_ts/rendertron.classes.rendertron.js'),
|
||||
};
|
||||
|
||||
if (checks.packageVersion !== '2.0.62') {
|
||||
throw new Error(`Unexpected corerender package version ${checks.packageVersion}`);
|
||||
}
|
||||
if (!checks.hasCli) {
|
||||
throw new Error('Missing cli.js');
|
||||
}
|
||||
if (!checks.hasIndex) {
|
||||
throw new Error('Missing dist_ts/index.js');
|
||||
}
|
||||
if (!checks.hasRendertronClass) {
|
||||
throw new Error('Missing rendertron class output');
|
||||
}
|
||||
|
||||
console.log(JSON.stringify(checks));
|
||||
NODE
|
||||
Reference in New Issue
Block a user