mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f1ce0078fd |
@@ -1,3 +1,6 @@
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
|
||||
buildAndDeployApkUnstable:
|
||||
stage: build
|
||||
script:
|
||||
|
||||
@@ -132,7 +132,7 @@ class UpdateDownloadService : Service() {
|
||||
}
|
||||
|
||||
try {
|
||||
performDownload(StateUpdate.APK_URL, partialFile, version, {
|
||||
performDownload(StateUpdate.getApkUrl(version), partialFile, version, {
|
||||
try {
|
||||
if (announcement != null)
|
||||
announcement?.setProgress(it);
|
||||
|
||||
@@ -134,7 +134,7 @@ class AutoUpdateDialog(context: Context?) : AlertDialog(context) {
|
||||
var inputStream: InputStream? = null;
|
||||
try {
|
||||
val client = ManagedHttpClient();
|
||||
val response = client.get(StateUpdate.APK_URL);
|
||||
val response = client.get(StateUpdate.getApkUrl(_maxVersion));
|
||||
if (response.isOk && response.body != null) {
|
||||
inputStream = response.body.byteStream();
|
||||
val dataLength = response.body.contentLength();
|
||||
|
||||
@@ -97,16 +97,16 @@ class StateUpdate {
|
||||
throw Exception("App is not compatible. Supported ABIS: ${Build.SUPPORTED_ABIS.joinToString()}}.");
|
||||
};
|
||||
val VERSION_URL = if (BuildConfig.IS_UNSTABLE_BUILD) {
|
||||
"https://releases.grayjay.app/version-unstable.txt"
|
||||
"https://rel.grayjay.app/version-unstable.txt"
|
||||
} else {
|
||||
"https://releases.grayjay.app/version.txt"
|
||||
"https://rel.grayjay.app/version.txt"
|
||||
}
|
||||
val APK_URL = if (BuildConfig.IS_UNSTABLE_BUILD) {
|
||||
"https://releases.grayjay.app/app-$DESIRED_ABI-release-unstable.apk"
|
||||
fun getApkUrl(version: Int): String = if (BuildConfig.IS_UNSTABLE_BUILD) {
|
||||
"https://rel.grayjay.app/$version/app-$DESIRED_ABI-release-unstable.apk"
|
||||
} else {
|
||||
"https://releases.grayjay.app/app-$DESIRED_ABI-release.apk"
|
||||
"https://rel.grayjay.app/$version/app-$DESIRED_ABI-release.apk"
|
||||
}
|
||||
val CHANGELOG_BASE_URL = "https://releases.grayjay.app/changelogs";
|
||||
val CHANGELOG_BASE_URL = "https://rel.grayjay.app/changelogs";
|
||||
|
||||
fun getApkFile(context: Context, version: Int): File {
|
||||
val dir = File(context.filesDir, "updates");
|
||||
|
||||
Reference in New Issue
Block a user