|
@@ -12,12 +12,6 @@ const minimist = require('minimist')
|
|
|
const writeFile = promisify(fs.writeFile)
|
|
|
const readFile = promisify(fs.readFile)
|
|
|
|
|
|
-const preType = {
|
|
|
- NONE: 'none',
|
|
|
- PARTIAL: 'partial',
|
|
|
- FULL: 'full'
|
|
|
-}
|
|
|
-
|
|
|
function parseCommandLine () {
|
|
|
let help
|
|
|
const opts = minimist(process.argv.slice(2), {
|
|
@@ -170,8 +164,8 @@ async function updateWinRC (components) {
|
|
|
const arr = data.split('\n')
|
|
|
arr.forEach((line, idx) => {
|
|
|
if (line.includes('FILEVERSION')) {
|
|
|
- arr[idx] = ` FILEVERSION ${utils.makeVersion(components, ',', preType.PARTIAL)}`
|
|
|
- arr[idx + 1] = ` PRODUCTVERSION ${utils.makeVersion(components, ',', preType.PARTIAL)}`
|
|
|
+ arr[idx] = ` FILEVERSION ${utils.makeVersion(components, ',', utils.preType.PARTIAL)}`
|
|
|
+ arr[idx + 1] = ` PRODUCTVERSION ${utils.makeVersion(components, ',', utils.preType.PARTIAL)}`
|
|
|
} else if (line.includes('FileVersion')) {
|
|
|
arr[idx] = ` VALUE "FileVersion", "${utils.makeVersion(components, '.')}"`
|
|
|
arr[idx + 5] = ` VALUE "ProductVersion", "${utils.makeVersion(components, '.')}"`
|