mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
added kobalt.version.last_checked
to kobalt-wrapper.properties
This commit is contained in:
parent
73b751f43f
commit
934db829dc
2 changed files with 12 additions and 4 deletions
|
@ -4,6 +4,7 @@ import com.beust.kobalt.api.Kobalt
|
|||
import com.beust.kobalt.misc.*
|
||||
import com.beust.kobalt.wrapper.Main
|
||||
import java.io.File
|
||||
import java.sql.Timestamp
|
||||
import java.util.concurrent.TimeoutException
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -13,7 +14,7 @@ import javax.inject.Inject
|
|||
public class UpdateKobalt @Inject constructor(val github: GithubApi, val wrapperProperties: KobaltWrapperProperties) {
|
||||
fun updateKobalt() {
|
||||
val newVersion = github.latestKobaltVersion
|
||||
wrapperProperties.create(newVersion.get())
|
||||
wrapperProperties.create(newVersion.get(), Timestamp(System.currentTimeMillis()))
|
||||
Main.main(arrayOf())
|
||||
}
|
||||
|
||||
|
@ -39,6 +40,7 @@ public class UpdateKobalt @Inject constructor(val github: GithubApi, val wrapper
|
|||
}
|
||||
}
|
||||
}
|
||||
wrapperProperties.create(wrapperProperties.version, Timestamp(System.currentTimeMillis()))
|
||||
} catch(ex: TimeoutException) {
|
||||
log(2, "Didn't get the new version in time, skipping it")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue