Skip to content

Commit ea7581f

Browse files
Merge pull request #5 from mxcl/fix-release
Fix travis and release mode compile
2 parents b955357 + b9be044 commit ea7581f

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ language: swift
66
osx_image:
77
- xcode10.2
88
- xcode10.1
9-
script: swift build
9+
env:
10+
- CONF=release
11+
- CONF=debug
12+
script: swift build --configuration $CONF

AppUpdater.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class AppUpdater {
5454
guard active.isResolved else {
5555
return active
5656
}
57-
guard let exename = Bundle.main.executableURL?.path else {
57+
guard Bundle.main.executableURL != nil else {
5858
return Promise(error: Error.bundleExecutableURL)
5959
}
6060
let currentVersion = Bundle.main.version
@@ -80,8 +80,8 @@ public class AppUpdater {
8080
unzip(dst, contentType: asset.content_type)
8181
}.compactMap { downloadedAppBundle in
8282
Bundle(url: downloadedAppBundle)
83-
}.then { downloadedAppBundle -> Promise<Path> in
84-
validate(codeSigning: .main, downloadedAppBundle)
83+
}.then { downloadedAppBundle in
84+
validate(codeSigning: .main, downloadedAppBundle).map{ downloadedAppBundle }
8585
}.done { downloadedAppBundle in
8686

8787
// UNIX is cool. Delete ourselves, move new one in then restart.
@@ -98,9 +98,9 @@ public class AppUpdater {
9898

9999
let proc = Process()
100100
if #available(OSX 10.13, *) {
101-
proc.launchPath = finalExecutable.string
102-
} else {
103101
proc.executableURL = finalExecutable.url
102+
} else {
103+
proc.launchPath = finalExecutable.string
104104
}
105105
proc.launch()
106106

0 commit comments

Comments
 (0)