mirror of
https://github.com/cverinc/tugtile.git
synced 2026-07-22 07:42:19 +00:00
No source lives here (the plugin is built in the private tile monorepo), so the meaningful check is release integrity, not a build: manifest required fields, manifest version present in versions.json with a matching minAppVersion, and that the bundled main.js parses. Adds scripts/test.sh (the single local entrypoint) and a CI workflow that runs it — matching the CVER per-repo standard, scoped to what a publish repo can actually verify. Co-authored-by: cverorg <292680828+cverorg@users.noreply.github.com>
20 lines
1.1 KiB
Bash
Executable file
20 lines
1.1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Release-integrity check for this thin publish repo. The plugin is built in the
|
|
# private tile monorepo; this repo only ships the artifacts (main.js, manifest,
|
|
# styles, versions), so there is nothing to compile here. This mirrors CI:
|
|
# validate manifest/versions consistency and that the bundled main.js parses.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
node -e '
|
|
const fs = require("fs");
|
|
const req = ["id","name","version","minAppVersion","description","author","isDesktopOnly"];
|
|
const m = JSON.parse(fs.readFileSync("manifest.json","utf8"));
|
|
for (const k of req) if (!(k in m)) throw new Error(`manifest.json missing "${k}"`);
|
|
const v = JSON.parse(fs.readFileSync("versions.json","utf8"));
|
|
if (!(m.version in v)) throw new Error(`manifest version ${m.version} is not listed in versions.json`);
|
|
if (v[m.version] !== m.minAppVersion) throw new Error(`versions.json[${m.version}]=${v[m.version]} != manifest.minAppVersion=${m.minAppVersion}`);
|
|
console.log(`manifest/versions OK — ${m.id} ${m.version} (minAppVersion ${m.minAppVersion})`);
|
|
'
|
|
node --check main.js
|
|
echo "main.js parses OK"
|