mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-30 22:07:57 +01:00 
			
		
		
		
	Add new build type for weekly preview (#6067)
This adds new build type for minified non-debuggable preview builds. "debugFull" is removed and "debug" will be unminified. **It means preview build action needs to be updated to build "standardPreview"**
This commit is contained in:
		| @@ -16,7 +16,7 @@ class AppUpdateChecker { | ||||
|     private val preferences: PreferencesHelper by injectLazy() | ||||
|  | ||||
|     private val repo: String by lazy { | ||||
|         if (BuildConfig.DEBUG) { | ||||
|         if (BuildConfig.PREVIEW) { | ||||
|             "tachiyomiorg/tachiyomi-preview" | ||||
|         } else { | ||||
|             "tachiyomiorg/tachiyomi" | ||||
| @@ -46,7 +46,7 @@ class AppUpdateChecker { | ||||
|         // Removes prefixes like "r" or "v" | ||||
|         val newVersion = versionTag.replace("[^\\d.]".toRegex(), "") | ||||
|  | ||||
|         return if (BuildConfig.DEBUG) { | ||||
|         return if (BuildConfig.PREVIEW) { | ||||
|             // Preview builds: based on releases in "tachiyomiorg/tachiyomi-preview" repo | ||||
|             // tagged as something like "r1234" | ||||
|             newVersion.toInt() > BuildConfig.COMMIT_COUNT.toInt() | ||||
|   | ||||
| @@ -40,10 +40,16 @@ class AboutController : SettingsController(), NoAppBarElevationController { | ||||
|         preference { | ||||
|             key = "pref_about_version" | ||||
|             titleRes = R.string.version | ||||
|             summary = if (BuildConfig.DEBUG) { | ||||
|                 "Preview r${BuildConfig.COMMIT_COUNT} (${BuildConfig.COMMIT_SHA}, ${getFormattedBuildTime()})" | ||||
|             } else { | ||||
|                 "Stable ${BuildConfig.VERSION_NAME} (${getFormattedBuildTime()})" | ||||
|             summary = when { | ||||
|                 BuildConfig.DEBUG -> { | ||||
|                     "Debug ${BuildConfig.COMMIT_SHA} (${getFormattedBuildTime()})" | ||||
|                 } | ||||
|                 BuildConfig.PREVIEW -> { | ||||
|                     "Preview r${BuildConfig.COMMIT_COUNT} (${BuildConfig.COMMIT_SHA}, ${getFormattedBuildTime()})" | ||||
|                 } | ||||
|                 else -> { | ||||
|                     "Stable ${BuildConfig.VERSION_NAME} (${getFormattedBuildTime()})" | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             onClick { | ||||
| @@ -61,17 +67,19 @@ class AboutController : SettingsController(), NoAppBarElevationController { | ||||
|                 onClick { checkVersion() } | ||||
|             } | ||||
|         } | ||||
|         preference { | ||||
|             key = "pref_about_whats_new" | ||||
|             titleRes = R.string.whats_new | ||||
|         if (!BuildConfig.DEBUG) { | ||||
|             preference { | ||||
|                 key = "pref_about_whats_new" | ||||
|                 titleRes = R.string.whats_new | ||||
|  | ||||
|             onClick { | ||||
|                 val url = if (BuildConfig.DEBUG) { | ||||
|                     "https://github.com/tachiyomiorg/tachiyomi-preview/releases/tag/r${BuildConfig.COMMIT_COUNT}" | ||||
|                 } else { | ||||
|                     "https://github.com/tachiyomiorg/tachiyomi/releases/tag/v${BuildConfig.VERSION_NAME}" | ||||
|                 onClick { | ||||
|                     val url = if (BuildConfig.PREVIEW) { | ||||
|                         "https://github.com/tachiyomiorg/tachiyomi-preview/releases/tag/r${BuildConfig.COMMIT_COUNT}" | ||||
|                     } else { | ||||
|                         "https://github.com/tachiyomiorg/tachiyomi/releases/tag/v${BuildConfig.VERSION_NAME}" | ||||
|                     } | ||||
|                     openInBrowser(url) | ||||
|                 } | ||||
|                 openInBrowser(url) | ||||
|             } | ||||
|         } | ||||
|         preference { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user