Skip to content

Commit

Permalink
fix: artifactName for portable
Browse files Browse the repository at this point in the history
Close #1340
  • Loading branch information
develar committed Mar 13, 2017
1 parent 2e7b668 commit 8f6247a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/electron-builder/src/targets/nsis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class NsisTarget extends Target {

let options = this.packager.config.nsis || Object.create(null)
if (targetName !== "nsis") {
options = Object.assign(options, (<any>this.packager.config)[targetName === "nsis-web" ? "nsisWeb" : ""])
options = Object.assign(options, (<any>this.packager.config)[targetName === "nsis-web" ? "nsisWeb" : targetName])
}
this.options = options

Expand Down
11 changes: 11 additions & 0 deletions test/out/windows/__snapshots__/installerTest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ Object {
}
`;

exports[`portable - artifactName 1`] = `
Object {
"win": Array [
Object {
"file": "Test App ßWPortable.1.1.0.exe",
"safeArtifactName": "TestApp-1.1.0.exe",
},
],
}
`;

exports[`portable 1`] = `
Object {
"win": Array [
Expand Down
12 changes: 12 additions & 0 deletions test/src/windows/installerTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,16 @@ test.ifNotCiMac("portable", app({
nsis: {
}
}
}))

test.ifAll.ifNotCiMac("portable - artifactName", app({
targets: Platform.WINDOWS.createTarget(["portable"]),
config: {
"nsis": {
"artifactName": "${productName}Installer.${version}.${ext}"
},
"portable": {
"artifactName": "${productName}Portable.${version}.${ext}"
}
}
}))

0 comments on commit 8f6247a

Please sign in to comment.