Skip to content

Commit

Permalink
add build flexiblity for Equinox
Browse files Browse the repository at this point in the history
  • Loading branch information
AriaMoradi committed Jun 5, 2021
1 parent bace854 commit 857562e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand All @@ -107,7 +107,6 @@ val tachideskRevision = runCatching {
}
process.destroy()
"r" + output.trim()

}
}.getOrDefault("r0")

Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rootProject.name = "Tachidesk"
rootProject.name = System.getenv("ProductName") ?: "Tachidesk"

include("server")

Expand Down

0 comments on commit 857562e

Please sign in to comment.