|
|
@ -2,6 +2,7 @@ import { execSync } from 'node:child_process' // 引入 child_process 模块用 |
|
|
|
import fs from 'node:fs' |
|
|
|
import path, { dirname } from 'node:path' |
|
|
|
import { fileURLToPath } from 'node:url' |
|
|
|
|
|
|
|
import semver from 'semver' |
|
|
|
|
|
|
|
const __filename = fileURLToPath(import.meta.url) |
|
|
@ -22,7 +23,7 @@ if (!newVersion) { |
|
|
|
|
|
|
|
packageJson.version = newVersion |
|
|
|
fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2)) |
|
|
|
console.log(`Version updated to: ${newVersion}`) |
|
|
|
console.log(`deviceType updated to: ${newVersion}`) |
|
|
|
|
|
|
|
// 新增:自动提交 package.json 到远程仓库
|
|
|
|
try { |
|
|
|