Fix repo url

Will add ci download later
This commit is contained in:
Dude so hot committed 2026-10-08 15:19:27 +08:00
1 parent 39398365e5
commit de2321ce8f
3 files changed
+9 -8

No files matched your search

+3 -4
View File
@@ -47,10 +47,9 @@ android {
commandLine = "git log -1 --format=%ct".split(' ')
}.standardOutput.asText.get().trim()
val repoName = providers.exec {
val repoUrl = providers.exec {
commandLine = "git remote get-url origin".split(' ')
}.standardOutput.asText.get().trim().removePrefix("https://github.com/").removePrefix("git@github.com:")
.removeSuffix(".git")
}.standardOutput.asText.get().trim().removeSuffix(".git")
val snapshot = !hasProperty("release")
@@ -66,7 +65,7 @@ android {
buildConfigField("String", "RAW_VERSION_NAME", "\"$versionName\"")
buildConfigField("String", "COMMIT_SHA", "\"$commitSha\"")
buildConfigField("long", "COMMIT_TIME", commitTime)
buildConfigField("String", "REPO_NAME", "\"$repoName\"")
buildConfigField("String", "REPO_URL", "\"$repoUrl\"")
ndk {
if (isRelease) {
abiFilters.addAll(supportedAbis)
@@ -49,8 +49,8 @@ import moe.tarsin.navigate
import moe.tarsin.snackbar
import moe.tarsin.string
private const val REPO_URL = "https://github.com/${BuildConfig.REPO_NAME}"
private const val RELEASE_URL = "$REPO_URL/releases"
const val REPO_URL = BuildConfig.REPO_URL
const val RELEASE_URL = "$REPO_URL/releases"
@Composable
@Stable
@@ -6,6 +6,8 @@ import com.hippo.ehviewer.EhApplication.Companion.ktorClient
import com.hippo.ehviewer.Settings
import com.hippo.ehviewer.client.executeAndParseAs
import com.hippo.ehviewer.spider.timeoutBySpeed
import com.hippo.ehviewer.ui.settings.RELEASE_URL
import com.hippo.ehviewer.ui.settings.REPO_URL
import com.hippo.ehviewer.util.copyTo
import io.ktor.client.request.HttpRequestBuilder
import io.ktor.client.request.accept
@@ -27,8 +29,8 @@ import tachiyomi.data.release.GithubRelease
import tachiyomi.data.release.GithubRepo
import tachiyomi.data.release.GithubWorkflowRuns
private const val API_URL = "https://api.github.com/repos/${BuildConfig.REPO_NAME}"
private const val LATEST_RELEASE_URL = "$API_URL/releases/latest"
private const val API_URL = "$REPO_URL/actions/runs"
const val LATEST_RELEASE_URL = "$RELEASE_URL/latest"
object AppUpdater {
suspend fun checkForUpdate(forceCheck: Boolean = false): Release? {