Merge remote-tracking branch 'origin/main'

This commit is contained in:
linyuchen
2024-04-16 13:25:25 +08:00

View File

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