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:
|
buildAndDeployApkUnstable:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ class UpdateDownloadService : Service() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
performDownload(StateUpdate.APK_URL, partialFile, version, {
|
performDownload(StateUpdate.getApkUrl(version), partialFile, version, {
|
||||||
try {
|
try {
|
||||||
if (announcement != null)
|
if (announcement != null)
|
||||||
announcement?.setProgress(it);
|
announcement?.setProgress(it);
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ class AutoUpdateDialog(context: Context?) : AlertDialog(context) {
|
|||||||
var inputStream: InputStream? = null;
|
var inputStream: InputStream? = null;
|
||||||
try {
|
try {
|
||||||
val client = ManagedHttpClient();
|
val client = ManagedHttpClient();
|
||||||
val response = client.get(StateUpdate.APK_URL);
|
val response = client.get(StateUpdate.getApkUrl(_maxVersion));
|
||||||
if (response.isOk && response.body != null) {
|
if (response.isOk && response.body != null) {
|
||||||
inputStream = response.body.byteStream();
|
inputStream = response.body.byteStream();
|
||||||
val dataLength = response.body.contentLength();
|
val dataLength = response.body.contentLength();
|
||||||
|
|||||||
@@ -97,16 +97,16 @@ class StateUpdate {
|
|||||||
throw Exception("App is not compatible. Supported ABIS: ${Build.SUPPORTED_ABIS.joinToString()}}.");
|
throw Exception("App is not compatible. Supported ABIS: ${Build.SUPPORTED_ABIS.joinToString()}}.");
|
||||||
};
|
};
|
||||||
val VERSION_URL = if (BuildConfig.IS_UNSTABLE_BUILD) {
|
val VERSION_URL = if (BuildConfig.IS_UNSTABLE_BUILD) {
|
||||||
"https://releases.grayjay.app/version-unstable.txt"
|
"https://rel.grayjay.app/version-unstable.txt"
|
||||||
} else {
|
} else {
|
||||||
"https://releases.grayjay.app/version.txt"
|
"https://rel.grayjay.app/version.txt"
|
||||||
}
|
}
|
||||||
val APK_URL = if (BuildConfig.IS_UNSTABLE_BUILD) {
|
fun getApkUrl(version: Int): String = if (BuildConfig.IS_UNSTABLE_BUILD) {
|
||||||
"https://releases.grayjay.app/app-$DESIRED_ABI-release-unstable.apk"
|
"https://rel.grayjay.app/$version/app-$DESIRED_ABI-release-unstable.apk"
|
||||||
} else {
|
} 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 {
|
fun getApkFile(context: Context, version: Int): File {
|
||||||
val dir = File(context.filesDir, "updates");
|
val dir = File(context.filesDir, "updates");
|
||||||
|
|||||||
Reference in New Issue
Block a user