feat: productversion and fileversion replacements in node-rc
This commit is contained in:
@@ -12,7 +12,13 @@ export default async function nodeRc(compiler: NexeCompiler, next: () => Promise
|
||||
let value = options[key]
|
||||
const isVar = /^[A-Z_]+$/.test(value)
|
||||
value = isVar ? value : `"${value}"`
|
||||
file.contents.replace(new RegExp(`VALUE "${key}",*`), `VALUE "${key}", ${value}`)
|
||||
file.contents = file.contents.replace(new RegExp(`VALUE "${key}",*`), `VALUE "${key}", ${value}`)
|
||||
})
|
||||
|
||||
;['PRODUCTVERSION', 'FILEVERSION'].forEach(x => {
|
||||
if (options[x]) {
|
||||
file.contents = file.contents.replace(new RegExp(x + ' .*$', 'm'),`${x} ${options[x]}`)
|
||||
}
|
||||
})
|
||||
|
||||
return next()
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { expect } from 'chai'
|
||||
import { blue as b } from 'chalk'
|
||||
import { getTarget, NexeTarget } from '../src/target'
|
||||
|
||||
const arch = (isWindows && process.arch === 'ia32') ? 'x86' : process.arch
|
||||
const arch = process.arch === 'ia32' ? 'x86' : process.arch
|
||||
|
||||
describe('Targets', () => {
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user