Merge remote-tracking branch 'origin/main'

This commit is contained in:
linyuchen 2024-04-16 13:00:02 +08:00
commit 031932f41c
2 changed files with 5 additions and 3 deletions

View File

@ -30,6 +30,7 @@ jobs:
node ./script/checkVersion.cjs node ./script/checkVersion.cjs
sh ./checkVersion.sh sh ./checkVersion.sh
build-linux: build-linux:
needs: [check-version]
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
@ -62,6 +63,7 @@ jobs:
path: dist path: dist
build-win32: build-win32:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [check-version]
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

View File

@ -6,10 +6,10 @@ let targetVersion = process.env.VERSION;
console.log("[NapCat] [CheckVersion] currentVersion:", currentVersion, " targetVersion:", targetVersion); console.log("[NapCat] [CheckVersion] currentVersion:", currentVersion, " targetVersion:", targetVersion);
// fs.mkdirSync("./dist"); // fs.mkdirSync("./dist");
if (currentVersion === targetVersion) { if (currentVersion === targetVersion) {
fs.appendFileSync("../checkVersion.sh", "#!/bin/bashe\necho \"CheckVersion Is Done\"") fs.writeFileSync("../checkVersion.sh", "#!/bin/bashe\necho \"CheckVersion Is Done\"")
} else { } else {
let packageJson = JSON.parse(fs.readFileSync("./package.json")); let packageJson = JSON.parse(fs.readFileSync("../package.json"));
packageJson.version = targetVersion; packageJson.version = targetVersion;
fs.writeFileSync("../package.json", JSON.stringify(packageJson)); fs.writeFileSync("../package.json", JSON.stringify(packageJson));
fs.appendFileSync("../checkVersion.sh", "#!/bin/bashe\ngit add .\n git commit -m \"chore:version change\"\n git push") fs.writeFileSync("../checkVersion.sh", "#!/bin/bashe\ngit add .\n git commit -m \"chore:version change\"\n git push")
} }