update version

This commit is contained in:
bipproduction
2025-11-17 16:40:37 +08:00
parent fcc85101fd
commit 87e77ced60
8 changed files with 1502 additions and 94 deletions

26
bin/version_update.ts Normal file
View File

@@ -0,0 +1,26 @@
import { execSync } from "node:child_process";
const NAMESPACE = process.env.NAMESPACE
if (!NAMESPACE) {
throw new Error('NAMESPACE is required')
}
// 1. Ambil versi remote dari npm
const remoteVersion = execSync(`npm view n8n-nodes-${NAMESPACE} version`)
.toString()
.trim();
console.log("🔍 Remote version:", remoteVersion);
// 2. Pecah versi → major.minor.patch
const [major, minor, patch] = remoteVersion.split(".").map(Number);
// 3. Generate versi baru: remote + 1 patch
const newLocalVersion = `${major}.${minor}.${patch + 1}`;
console.log("⬆️ New local version:", newLocalVersion);
// 4. Update package.json di folder src
execSync(`cd src && npm version ${newLocalVersion} --allow-all --force`, {
stdio: "inherit",
});