add build flexiblity for Equinox

This commit is contained in:
Aria Moradi 2021-06-06 02:48:26 +04:30
parent bace854b50
commit 857562eaff
4 changed files with 6 additions and 7 deletions

View File

@ -62,7 +62,7 @@ jobs:
- name: Build and copy webUI, Build Jar
uses: eskatos/gradle-command-action@v1
env:
TachideskBuildType: "Preview"
ProductBuildType: "Preview"
with:
build-root-directory: master
wrapper-directory: master

View File

@ -61,7 +61,7 @@ jobs:
- name: Build and copy webUI, Build Jar
uses: eskatos/gradle-command-action@v1
env:
TachideskBuildType: "Stable"
ProductBuildType: "Stable"
with:
build-root-directory: master
wrapper-directory: master

View File

@ -93,11 +93,11 @@ sourceSets {
}
// should be bumped with each stable release
val tachideskVersion = "v0.4.2"
val tachideskVersion = System.getenv("ProductVersion") ?: "v0.4.2"
// counts commit count on master
val tachideskRevision = runCatching {
Runtime
System.getenv("ProductRevision") ?: Runtime
.getRuntime()
.exec("git rev-list HEAD --count")
.let { process ->
@ -107,7 +107,6 @@ val tachideskRevision = runCatching {
}
process.destroy()
"r" + output.trim()
}
}.getOrDefault("r0")
@ -119,7 +118,7 @@ buildConfig {
buildConfigField("String", "NAME", rootProject.name)
buildConfigField("String", "VERSION", tachideskVersion)
buildConfigField("String", "REVISION", tachideskRevision)
buildConfigField("String", "BUILD_TYPE", if (System.getenv("TachideskBuildType") == "Stable") "Stable" else "Preview")
buildConfigField("String", "BUILD_TYPE", if (System.getenv("ProductBuildType") == "Stable") "Stable" else "Preview")
buildConfigField("long", "BUILD_TIME", Instant.now().epochSecond.toString())
buildConfigField("String", "GITHUB", "https://github.com/Suwayomi/Tachidesk")

View File

@ -1,4 +1,4 @@
rootProject.name = "Tachidesk"
rootProject.name = System.getenv("ProductName") ?: "Tachidesk"
include("server")