diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 66814ce94de..14ec4c0dccc 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -33,6 +33,7 @@ android { val vCode = System.getenv("VERSION_CODE")?.toIntOrNull() ?: 1 versionCode = vCode versionName = "$ver-$vCode" + buildConfigField("String", "VERSION_DATE", "\"${System.getenv("VERSION_DATE") ?: ""}\"") manifestPlaceholders["sentryRelease"] = "$applicationId@$versionName" } diff --git a/app/src/main/java/io/homeassistant/companion/android/settings/SettingsFragment.kt b/app/src/main/java/io/homeassistant/companion/android/settings/SettingsFragment.kt index 9a107acf261..398c2baeaea 100644 --- a/app/src/main/java/io/homeassistant/companion/android/settings/SettingsFragment.kt +++ b/app/src/main/java/io/homeassistant/companion/android/settings/SettingsFragment.kt @@ -165,7 +165,7 @@ class SettingsFragment : PreferenceFragmentCompat(), SettingsView { findPreference("version")?.let { it.isCopyingEnabled = true - it.summary = BuildConfig.VERSION_NAME + it.summary = "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_DATE})" } presenter.onCreate() diff --git a/release.bat b/release.bat index 921977de5a6..0c679f0c5ca 100644 --- a/release.bat +++ b/release.bat @@ -18,12 +18,15 @@ SET TAGS=%%F SET /A "VC=%COMMITS%+%TAGS%" IF "%VC%" GEQ "328" SET /A "VC=%COMMITS%+%TAGS%+%OFFSET%" IF "%VC%" GEQ "775" SET /A "VC=(%COMMITS%+%TAGS%)<<1" +SET VERSION_DATE=20220310 echo Version %VERSION% echo Version Code %VC% +echo Version Date %VERSION_DATE% SETX VERSION %VERSION% SETX VERSION_CODE %VC% +SETX VERSION_DATE %VERSION_DATE% SETX KEYSTORE_PASSWORD password SETX KEYSTORE_ALIAS testkey SETX KEYSTORE_ALIAS_PASSWORD android -echo Home Assistant-%VERSION%-%VC%> release-name.txt +echo Home Assistant-%VERSION%-%VC% (%VERSION_DATE%)> release-name.txt pause \ No newline at end of file