From 857562eaffd538337c5b0fa2eded5960617488b5 Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Sun, 6 Jun 2021 02:48:26 +0430 Subject: [PATCH] add build flexiblity for Equinox --- .github/workflows/build_push.yml | 2 +- .github/workflows/publish.yml | 2 +- server/build.gradle.kts | 7 +++---- settings.gradle.kts | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_push.yml b/.github/workflows/build_push.yml index 9d8162b..3926eab 100644 --- a/.github/workflows/build_push.yml +++ b/.github/workflows/build_push.yml @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ea83961..c12cf5d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 diff --git a/server/build.gradle.kts b/server/build.gradle.kts index dd0c462..3e91238 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -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") diff --git a/settings.gradle.kts b/settings.gradle.kts index 971401e..bb2fc89 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,4 @@ -rootProject.name = "Tachidesk" +rootProject.name = System.getenv("ProductName") ?: "Tachidesk" include("server")