From b9617cb23ecc629ceeecbe4d5bc896bbee1b15de Mon Sep 17 00:00:00 2001 From: Alex Kozack Date: Wed, 21 Dec 2016 16:30:02 +0200 Subject: [PATCH 1/3] Added check "RC" version --- src/packager.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/packager.ts b/src/packager.ts index 12be14050d9..2f676d88904 100644 --- a/src/packager.ts +++ b/src/packager.ts @@ -320,6 +320,11 @@ export async function checkWineVersion(checkPromise: Promise) { wineVersion = wineVersion.substring(0, spaceIndex) } + const rcIndex = wineVersion.indexOf("-rc") + if (rcIndex > 0) { + wineVersion = wineVersion.substring(0, rcIndex) + } + if (wineVersion.split(".").length === 2) { wineVersion += ".0" } From 8e939ef3a35a2c6767c090347f683fc664e6c880 Mon Sep 17 00:00:00 2001 From: Alex Kozack Date: Wed, 21 Dec 2016 16:32:20 +0200 Subject: [PATCH 2/3] New test: Check "RC" wine version --- test/src/BuildTest.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/src/BuildTest.ts b/test/src/BuildTest.ts index 77c0d98aed7..ef69abe0c11 100644 --- a/test/src/BuildTest.ts +++ b/test/src/BuildTest.ts @@ -213,10 +213,11 @@ test.ifDevOrLinuxCi("smart unpack", () => { test("wine version", async () => { await checkWineVersion(BluebirdPromise.resolve("1.9.23 (Staging)")) + await checkWineVersion(BluebirdPromise.resolve("2.0-rc2")) }) function currentPlatform(): PackagerOptions { return { targets: Platform.fromString(process.platform).createTarget(DIR_TARGET), } -} \ No newline at end of file +} From 22522747a21a83bcd43415ed05aac91402b34934 Mon Sep 17 00:00:00 2001 From: Alex Kozack Date: Wed, 21 Dec 2016 17:23:35 +0200 Subject: [PATCH 3/3] Trim suffix from wine version --- src/packager.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/packager.ts b/src/packager.ts index 2f676d88904..73db795e82c 100644 --- a/src/packager.ts +++ b/src/packager.ts @@ -320,9 +320,9 @@ export async function checkWineVersion(checkPromise: Promise) { wineVersion = wineVersion.substring(0, spaceIndex) } - const rcIndex = wineVersion.indexOf("-rc") - if (rcIndex > 0) { - wineVersion = wineVersion.substring(0, rcIndex) + const suffixIndex = wineVersion.indexOf("-") + if (suffixIndex > 0) { + wineVersion = wineVersion.substring(0, suffixIndex) } if (wineVersion.split(".").length === 2) {