Browse Source

fix: 设备脚本提示

master
guoapeng 1 week ago
parent
commit
0304ff451b
  1. 2
      increment-version.js
  2. 2
      update-device.js

2
increment-version.js

@ -23,7 +23,7 @@ if (!newVersion) {
packageJson.version = newVersion packageJson.version = newVersion
fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2)) fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2))
console.log(`deviceType updated to: ${newVersion}`)
console.log(`version updated to: ${newVersion}`)
// 新增:自动提交 package.json 到远程仓库 // 新增:自动提交 package.json 到远程仓库
try { try {

2
update-device.js

@ -14,4 +14,4 @@ const deviceType = process.argv[2] || 'DT300W'
packageJson.device = deviceType packageJson.device = deviceType
fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2)) fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2))
console.log(`Version updated to: ${deviceType}`)
console.log(`device updated to: ${deviceType}`)
Loading…
Cancel
Save