Fix repo url
Will add ci download later
This commit is contained in:
1 parent
39398365e5
commit
de2321ce8f
3 files changed
+9
-8
No files matched your search
@@ -47,10 +47,9 @@ android {
|
|||||||
commandLine = "git log -1 --format=%ct".split(' ')
|
commandLine = "git log -1 --format=%ct".split(' ')
|
||||||
}.standardOutput.asText.get().trim()
|
}.standardOutput.asText.get().trim()
|
||||||
|
|
||||||
val repoName = providers.exec {
|
val repoUrl = providers.exec {
|
||||||
commandLine = "git remote get-url origin".split(' ')
|
commandLine = "git remote get-url origin".split(' ')
|
||||||
}.standardOutput.asText.get().trim().removePrefix("https://github.com/").removePrefix("git@github.com:")
|
}.standardOutput.asText.get().trim().removeSuffix(".git")
|
||||||
.removeSuffix(".git")
|
|
||||||
|
|
||||||
val snapshot = !hasProperty("release")
|
val snapshot = !hasProperty("release")
|
||||||
|
|
||||||
@@ -66,7 +65,7 @@ android {
|
|||||||
buildConfigField("String", "RAW_VERSION_NAME", "\"$versionName\"")
|
buildConfigField("String", "RAW_VERSION_NAME", "\"$versionName\"")
|
||||||
buildConfigField("String", "COMMIT_SHA", "\"$commitSha\"")
|
buildConfigField("String", "COMMIT_SHA", "\"$commitSha\"")
|
||||||
buildConfigField("long", "COMMIT_TIME", commitTime)
|
buildConfigField("long", "COMMIT_TIME", commitTime)
|
||||||
buildConfigField("String", "REPO_NAME", "\"$repoName\"")
|
buildConfigField("String", "REPO_URL", "\"$repoUrl\"")
|
||||||
ndk {
|
ndk {
|
||||||
if (isRelease) {
|
if (isRelease) {
|
||||||
abiFilters.addAll(supportedAbis)
|
abiFilters.addAll(supportedAbis)
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ import moe.tarsin.navigate
|
|||||||
import moe.tarsin.snackbar
|
import moe.tarsin.snackbar
|
||||||
import moe.tarsin.string
|
import moe.tarsin.string
|
||||||
|
|
||||||
private const val REPO_URL = "https://github.com/${BuildConfig.REPO_NAME}"
|
const val REPO_URL = BuildConfig.REPO_URL
|
||||||
private const val RELEASE_URL = "$REPO_URL/releases"
|
const val RELEASE_URL = "$REPO_URL/releases"
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@Stable
|
@Stable
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import com.hippo.ehviewer.EhApplication.Companion.ktorClient
|
|||||||
import com.hippo.ehviewer.Settings
|
import com.hippo.ehviewer.Settings
|
||||||
import com.hippo.ehviewer.client.executeAndParseAs
|
import com.hippo.ehviewer.client.executeAndParseAs
|
||||||
import com.hippo.ehviewer.spider.timeoutBySpeed
|
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 com.hippo.ehviewer.util.copyTo
|
||||||
import io.ktor.client.request.HttpRequestBuilder
|
import io.ktor.client.request.HttpRequestBuilder
|
||||||
import io.ktor.client.request.accept
|
import io.ktor.client.request.accept
|
||||||
@@ -27,8 +29,8 @@ import tachiyomi.data.release.GithubRelease
|
|||||||
import tachiyomi.data.release.GithubRepo
|
import tachiyomi.data.release.GithubRepo
|
||||||
import tachiyomi.data.release.GithubWorkflowRuns
|
import tachiyomi.data.release.GithubWorkflowRuns
|
||||||
|
|
||||||
private const val API_URL = "https://api.github.com/repos/${BuildConfig.REPO_NAME}"
|
private const val API_URL = "$REPO_URL/actions/runs"
|
||||||
private const val LATEST_RELEASE_URL = "$API_URL/releases/latest"
|
const val LATEST_RELEASE_URL = "$RELEASE_URL/latest"
|
||||||
|
|
||||||
object AppUpdater {
|
object AppUpdater {
|
||||||
suspend fun checkForUpdate(forceCheck: Boolean = false): Release? {
|
suspend fun checkForUpdate(forceCheck: Boolean = false): Release? {
|
||||||
|
|||||||
Reference in new issue
Block a user