Compare commits

...

1 Commits

Author SHA1 Message Date
Koen J f1ce0078fd Switch to rel.grayjay.app 2026-04-30 11:03:44 +02:00
4 changed files with 11 additions and 8 deletions
+3
View File
@@ -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");