From ab2127b5c84b7e95638dfe31370d6d2e78d1f115 Mon Sep 17 00:00:00 2001 From: David Sn Date: Fri, 1 Feb 2019 23:53:00 +0100 Subject: [PATCH] Display repo remote url in version --- app/build.gradle | 4 ++-- .../java/de/codebucket/mkkm/activity/SettingsActivity.java | 2 +- build-release.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5b4d1c6..ed8b1db 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -37,8 +37,8 @@ android { buildConfigField "String", "ENCRYPTION_KEY", ext.encryptionKey // Internal build info values - buildConfigField "String", "HOSTNAME", '"' + System.getenv("DRONE_REMOTE_URL") + '"' - buildConfigField "String", "CI_VERSION", '"' + System.getenv("DRONE_SYSTEM_VERSION") + '"' + buildConfigField "String", "REMOTE_URL", '"' + System.getenv("DRONE_REMOTE_URL") + '"' + buildConfigField "String", "DRONE_VERSION", '"' + System.getenv("DRONE_SYSTEM_VERSION") + '"' if (System.getenv("TRAVIS") == "true") { versionCode = Integer.valueOf(System.getenv("TRAVIS_BUILD_NUMBER")) diff --git a/app/src/main/java/de/codebucket/mkkm/activity/SettingsActivity.java b/app/src/main/java/de/codebucket/mkkm/activity/SettingsActivity.java index 278cf9c..39a9108 100644 --- a/app/src/main/java/de/codebucket/mkkm/activity/SettingsActivity.java +++ b/app/src/main/java/de/codebucket/mkkm/activity/SettingsActivity.java @@ -140,7 +140,7 @@ public boolean onPreferenceClick(Preference preference) { }); Preference version = findPreference("version"); - version.setSummary(getString(R.string.pref_version_description, BuildConfig.VERSION_NAME, BuildConfig.BUILD_TYPE, BuildConfig.GIT_VERSION, BuildConfig.HOSTNAME)); + version.setSummary(getString(R.string.pref_version_description, BuildConfig.VERSION_NAME, BuildConfig.BUILD_TYPE, BuildConfig.GIT_VERSION, BuildConfig.REMOTE_URL)); } @Override diff --git a/build-release.sh b/build-release.sh index aa7026a..d9f9769 100755 --- a/build-release.sh +++ b/build-release.sh @@ -11,7 +11,7 @@ export TRAVIS=true export TRAVIS_BUILD_NUMBER=$1 export TRAVIS_EVENT_TYPE=push export MAJOR_MINOR=1.1.0 -export DRONE_MACHINE=localhost +export REMOTE_URL=https://github.com/divadsn/mobileKKM.git bash ./gradlew app:assembleRelease status=$?