22df7e3074
CI Publish / Validate Gradle Wrapper (push) Successful in 2m14s
CI Publish / jlink (linux-x64, ubuntu-latest) (push) Failing after 1m6s
CI Publish / Build Jar (push) Failing after 2m8s
CI Publish / jlink (macOS-arm64, macos-14) (push) Has been cancelled
CI Publish / jlink (macOS-x64, macos-13) (push) Has been cancelled
CI Publish / jlink (windows-x64, windows-latest) (push) Has been cancelled
CI Publish / Make debian-all release (push) Has been cancelled
CI Publish / Make linux-assets release (push) Has been cancelled
CI Publish / Make linux-x64 release (push) Has been cancelled
CI Publish / Make macOS-arm64 release (push) Has been cancelled
CI Publish / Make macOS-x64 release (push) Has been cancelled
CI Publish / Make windows-x64 release (push) Has been cancelled
CI Publish / release (push) Has been cancelled
36 lines
1.0 KiB
Kotlin
36 lines
1.0 KiB
Kotlin
import java.io.BufferedReader
|
|
|
|
/*
|
|
* Copyright (C) Contributors to the Suwayomi project
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
const val MainClass = "suwayomi.tachidesk.MainKt"
|
|
|
|
// should be bumped with each stable release
|
|
val getTachideskVersion = { "v2.0.${getCommitCount()}" }
|
|
|
|
val webUIRevisionTag = "r2467"
|
|
|
|
private val getCommitCount = {
|
|
runCatching {
|
|
ProcessBuilder()
|
|
.command("git", "rev-list", "HEAD", "--count")
|
|
.start()
|
|
.let { process ->
|
|
process.waitFor()
|
|
val output = process.inputStream.use {
|
|
it.bufferedReader().use(BufferedReader::readText)
|
|
}
|
|
process.destroy()
|
|
output.trim()
|
|
}
|
|
}.getOrDefault("0")
|
|
}
|
|
|
|
// counts commits on the current checked out branch
|
|
val getTachideskRevision = { "r${getCommitCount()}" }
|
|
|