1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-27 08:38:13 -07:00
This commit is contained in:
Cedric Beust 2016-01-07 00:51:19 +04:00
parent 949fc353d8
commit 2db5df1897

View file

@ -93,6 +93,7 @@ private class Main @Inject constructor(
} }
} }
if (! args.update) {
log(1, if (result != 0) "BUILD FAILED: $result" else "BUILD SUCCESSFUL ($seconds seconds)") log(1, if (result != 0) "BUILD FAILED: $result" else "BUILD SUCCESSFUL ($seconds seconds)")
// Check for new version // Check for new version
@ -114,6 +115,7 @@ private class Main @Inject constructor(
} catch(ex: TimeoutException) { } catch(ex: TimeoutException) {
log(2, "Didn't get the new version in time, skipping it") log(2, "Didn't get the new version in time, skipping it")
} }
}
return result return result
} }
@ -146,6 +148,14 @@ private class Main @Inject constructor(
} else if (args.serverMode) { } else if (args.serverMode) {
server.run() server.run()
} else { } else {
// Update doesn't require to parse the build file
if (args.update) {
// --update
updateKobalt.updateKobalt()
} else {
//
// Everything below requires to parse the build file first
//
if (!buildFile.exists()) { if (!buildFile.exists()) {
error(buildFile.path.toFile().path + " does not exist") error(buildFile.path.toFile().path + " does not exist")
} else { } else {
@ -182,9 +192,6 @@ private class Main @Inject constructor(
} else if (args.download) { } else if (args.download) {
// -- download // -- download
updateKobalt.downloadKobalt() updateKobalt.downloadKobalt()
} else if (args.update) {
// --update
updateKobalt.updateKobalt()
} else { } else {
// //
// Launch the build // Launch the build
@ -198,6 +205,7 @@ private class Main @Inject constructor(
} }
} }
} }
}
return result return result
} }