1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-25 16:07:12 -07:00

Merge pull request #380 from ethauvin/master

Disable release version check if --dev
This commit is contained in:
Cedric Beust 2017-04-01 06:09:47 -07:00 committed by GitHub
commit a749dbf9b6
2 changed files with 5 additions and 1 deletions

View file

@ -110,11 +110,13 @@ class GithubApi2 @Inject constructor(
return Observable.just(UploadAssetResponse(tagName, tagName))
}
var isDev: Boolean = false
val latestKobaltVersion: Future<String>
get() {
val callable = Callable<String> {
var result = Kobalt.version
if (Duration.ofMinutes(10L) >
if (! isDev && Duration.ofMinutes(10L) >
Duration.between(VersionCheckTimestampFile.timestamp, Instant.now())) {
kobaltLog(2, "Skipping GitHub latest release check, too soon.")
} else {

View file

@ -93,6 +93,8 @@ private class Main @Inject constructor(
}
var result = 1
github.isDev = args.dev
val latestVersionFuture = github.latestKobaltVersion
try {