generated from mirrors/plugin-sample-vite-svelte
Fix CI build error
All checks were successful
Build on Push and create Release on Tag / build (push) Successful in 1m18s
All checks were successful
Build on Push and create Release on Tag / build (push) Successful in 1m18s
This commit is contained in:
parent
c69eaca7e9
commit
a13ac05afb
2 changed files with 25 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "syspell",
|
||||
"version": "0.5.0",
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"description": "Include a whiteboard for freehand drawing anywhere in your documents.",
|
||||
"repository": "https://git.massive.box/massivebox/siyuan-jsdraw-plugin",
|
||||
|
|
24
scripts/validate_tag.cjs
Normal file
24
scripts/validate_tag.cjs
Normal file
|
@ -0,0 +1,24 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const [tagName] = process.argv.slice(2); // Get tag from CLI arguments
|
||||
if (!tagName) {
|
||||
console.error('Error: No tag name provided.');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const TAG_VERSION = tagName.replace('refs/tags/v', '');
|
||||
|
||||
try {
|
||||
const packageJson = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8'));
|
||||
const pluginJson = JSON.parse(fs.readFileSync(path.resolve('plugin.json'), 'utf8'));
|
||||
|
||||
if (TAG_VERSION !== packageJson.version || TAG_VERSION !== pluginJson.version) {
|
||||
console.error(`Error: Tag version (${TAG_VERSION}) does not match package.json (${packageJson.version}) or plugin.json (${pluginJson.version})`);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log('Tag version matches both JSON files.');
|
||||
} catch (err) {
|
||||
console.error('Failed to read or parse JSON files:', err.message);
|
||||
process.exit(1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue