mirror of
https://github.com/addyosmani/agent-skills.git
synced 2026-10-26 15:05:04 +00:00
fix(scripts): validate manifest versions against canonical root plugin.json
Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
This commit is contained in:
1 parent
df1edb2e05
commit
a1554c7b37
2 files changed
+7
-11
No files matched your search
@@ -18,12 +18,9 @@ function readManifestVersion(manifestPath) {
|
||||
return manifest.version ?? manifest.plugins?.[0]?.version;
|
||||
}
|
||||
|
||||
test("all plugin manifests use the latest release tag", () => {
|
||||
const expectedVersion = execFileSync(
|
||||
"git",
|
||||
["describe", "--tags", "--abbrev=0"],
|
||||
{ encoding: "utf8" },
|
||||
).trim();
|
||||
test("all plugin manifests use the root plugin.json version", () => {
|
||||
const expectedVersion = readManifestVersion("plugin.json");
|
||||
assert.ok(expectedVersion, "plugin.json must define a version");
|
||||
|
||||
for (const manifestPath of manifestPaths) {
|
||||
assert.equal(
|
||||
|
||||
@@ -18,11 +18,10 @@ function readManifestVersion(manifestPath) {
|
||||
return manifest.version ?? manifest.plugins?.[0]?.version;
|
||||
}
|
||||
|
||||
const expectedVersion = execFileSync(
|
||||
"git",
|
||||
["describe", "--tags", "--abbrev=0"],
|
||||
{ encoding: "utf8" },
|
||||
).trim();
|
||||
const expectedVersion = readManifestVersion("plugin.json");
|
||||
if (!expectedVersion) {
|
||||
throw new Error("plugin.json is missing a version field");
|
||||
}
|
||||
|
||||
for (const manifestPath of manifestPaths) {
|
||||
const version = readManifestVersion(manifestPath);
|
||||
|
||||
Reference in new issue
Block a user