gitリポジトリのurlを貼り付けるだけでアプリケーションのビルドを実行するアプリ。 macOS用
Révision | b770341461893d4cebde01f7dbf45902f54bfc58 (tree) |
---|---|
l'heure | 2018-04-07 23:33:21 |
Auteur | masakih <masakih@user...> |
Commiter | masakih |
ProcessExtensionを使用するように変更
@@ -49,18 +49,15 @@ final class ProjectBuilder { | ||
49 | 49 | throw ProjectBuilderError.other("URL is Invalid.") |
50 | 50 | } |
51 | 51 | |
52 | - let xcodebuild = Process() | |
53 | - xcodebuild.launchPath = builderURL.path | |
54 | - xcodebuild.arguments = info.arguments | |
52 | + let xcodebuild = Process() <<< builderURL.path <<< info.arguments | |
55 | 53 | xcodebuild.currentDirectoryPath = info.projectURL.path |
54 | + xcodebuild >>> { stdout, stderr in | |
55 | + | |
56 | + let log = LogStocker("xcodebuild.log") | |
57 | + log?.write(stdout.data) | |
58 | + log?.write(stderr.data) | |
59 | + } | |
56 | 60 | |
57 | - let pipe = Pipe() | |
58 | - xcodebuild.standardOutput = pipe | |
59 | - xcodebuild.standardError = pipe | |
60 | - let log = LogStocker("xcodebuild.log") | |
61 | - log?.read(pipe.fileHandleForReading) | |
62 | - | |
63 | - xcodebuild.launch() | |
64 | 61 | xcodebuild.waitUntilExit() |
65 | 62 | |
66 | 63 | guard xcodebuild.terminationStatus == 0 |