From c987439eaca5b2b2aa4581ea110d412fa99b6932 Mon Sep 17 00:00:00 2001 From: develar Date: Tue, 19 Apr 2016 10:27:39 +0200 Subject: [PATCH] fix: get rid of nuget to pack win --- package.json | 15 +++++++++------ src/macPackager.ts | 3 +-- test/src/BuildTest.ts | 4 +++- test/src/helpers/expectedContents.ts | 4 +++- test/src/helpers/packTester.ts | 7 ++++--- 5 files changed, 20 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 846d96dd6dd..67ae8427649 100644 --- a/package.json +++ b/package.json @@ -54,13 +54,13 @@ "bugs": "https://github.com/electron-userland/electron-builder/issues", "homepage": "https://github.com/electron-userland/electron-builder", "dependencies": { - "7zip-bin": "^0.0.3", + "7zip-bin": "^0.0.4", "bluebird": "^3.3.5", "command-line-args": "^2.1.6", "deep-assign": "^2.0.0", "electron-packager": "^7.0.0", - "electron-winstaller-fixed": "^2.2.1-beta.0", - "fs-extra": "^0.27.0", + "electron-winstaller-fixed": "~2.3.0-beta.0", + "fs-extra": "^0.28.0", "fs-extra-p": "^0.2.0", "globby": "^4.0.0", "hosted-git-info": "^2.1.4", @@ -74,7 +74,7 @@ "tmp": "0.0.28" }, "optionalDependencies": { - "appdmg": "^0.3.6" + "appdmg": "^0.3.7" }, "devDependencies": { "ava-tf": "^0.12.4-beta.6", @@ -93,7 +93,7 @@ "tsconfig-glob": "^0.4.3", "tslint": "next", "typescript": "^1.9.0-dev.20160414", - "validate-commit-msg": "^2.6.0" + "validate-commit-msg": "^2.6.1" }, "babel": { "plugins": [ @@ -112,5 +112,8 @@ "typings": "./out/electron-builder.d.ts", "precommit": [ "validate-commit-msg" - ] + ], + "publishConfig": { + "tag": "next" + } } diff --git a/src/macPackager.ts b/src/macPackager.ts index 473653f4fa2..c6fb456591e 100644 --- a/src/macPackager.ts +++ b/src/macPackager.ts @@ -107,8 +107,7 @@ export default class MacPackager extends PlatformPackager { log("Creating ZIP for Squirrel.Mac") // we use app name here - see https://github.com/electron-userland/electron-builder/pull/204 const resultPath = `${this.appName}-${this.metadata.version}-mac.zip` - // -y param is important - "store symbolic links as the link instead of the referenced file" - const args = ["a", "-mm=" + (this.devMetadata.build.compression === "store" ? "Copy" : "Deflate"), "-r", "-bb0", "-bd"] + const args = ["a", "-mm=" + (this.devMetadata.build.compression === "store" ? "Copy" : "Deflate"), "-bb0", "-bd"] if (this.devMetadata.build.compression === "maximum") { // http://superuser.com/a/742034 //noinspection SpellCheckingInspection diff --git a/test/src/BuildTest.ts b/test/src/BuildTest.ts index a909297e258..88fcea92d72 100755 --- a/test/src/BuildTest.ts +++ b/test/src/BuildTest.ts @@ -120,16 +120,18 @@ test("copy extra resource", async () => { "lib/net45/libEGL.dll", "lib/net45/libGLESv2.dll", "lib/net45/LICENSE", + "lib/net45/LICENSES.chromium.html", "lib/net45/msvcp120.dll", "lib/net45/msvcr120.dll", "lib/net45/natives_blob.bin", "lib/net45/node.dll", "lib/net45/platformSpecific", "lib/net45/snapshot_blob.bin", - "lib/net45/squirrel.exe", "lib/net45/TestApp.exe", "lib/net45/ui_resources_200_percent.pak", + "lib/net45/Update.exe", "lib/net45/vccorlib120.dll", + "lib/net45/version", "lib/net45/xinput1_3.dll", "lib/net45/bar/hello.txt", "lib/net45/bar/x64.txt", diff --git a/test/src/helpers/expectedContents.ts b/test/src/helpers/expectedContents.ts index 554791bd03d..62e68c10110 100755 --- a/test/src/helpers/expectedContents.ts +++ b/test/src/helpers/expectedContents.ts @@ -64,15 +64,17 @@ export const expectedWinContents = [ "lib/net45/libEGL.dll", "lib/net45/libGLESv2.dll", "lib/net45/LICENSE", + "lib/net45/LICENSES.chromium.html", "lib/net45/msvcp120.dll", "lib/net45/msvcr120.dll", "lib/net45/natives_blob.bin", "lib/net45/node.dll", "lib/net45/snapshot_blob.bin", - "lib/net45/squirrel.exe", "lib/net45/TestApp.exe", "lib/net45/ui_resources_200_percent.pak", + "lib/net45/Update.exe", "lib/net45/vccorlib120.dll", + "lib/net45/version", "lib/net45/xinput1_3.dll", "lib/net45/locales/en-US.pak", "lib/net45/resources/app.asar", diff --git a/test/src/helpers/packTester.ts b/test/src/helpers/packTester.ts index d8b9870c34a..0a1bdb94e7d 100755 --- a/test/src/helpers/packTester.ts +++ b/test/src/helpers/packTester.ts @@ -240,19 +240,20 @@ async function checkWindowsResult(packager: Packager, packagerOptions: PackagerO await unZipper.extractFile(fileDescriptors.filter(it => it.path === "TestApp.nuspec")[0], { path: path.dirname(packageFile), }) - assertThat((await readFile(path.join(path.dirname(packageFile), "TestApp.nuspec"), "utf8")).replace(/\r\n/g, "\n")).equal(` + const expectedSpec = await readFile(path.join(path.dirname(packageFile), "TestApp.nuspec"), "utf8") + assertThat((expectedSpec).replace(/\r\n/g, "\n")).equal(` TestApp - 1.1.0 ${productName} + 1.1.0 Foo Bar Foo Bar - http://foo.example.com https://raw.githubusercontent.com/szwacz/electron-boilerplate/master/resources/windows/icon.ico false Test Application Copyright © ${new Date().getFullYear()} Foo Bar + http://foo.example.com `) }