mirror of
https://github.com/home-assistant/android
synced 2024-07-08 20:05:52 +00:00
Build/Release Changes (#423)
* Fix app version in settings. * Dependency Upgrades * Enable beta -> production promotion via tag in Travis. * Fix firebase release notes location. * Add some logging around what we are building. * TRAVIS_PULL_REQUEST is a number or false....
This commit is contained in:
parent
fb39094210
commit
03478310c0
|
@ -2,23 +2,32 @@
|
|||
|
||||
set -ev
|
||||
|
||||
git log --format=%B -n 1 $TRAVIS_COMMIT > CHANGES.md
|
||||
mkdir -p app/src/main/play/release-notes/en-US/
|
||||
cp CHANGES.md app/src/main/play/release-notes/en-US/default.txt
|
||||
|
||||
export VERSION_CODE=`git rev-list --count HEAD`
|
||||
|
||||
./gradlew test
|
||||
./gradlew lint
|
||||
./gradlew ktlintCheck
|
||||
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ]
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]
|
||||
then
|
||||
if [ -n "$TRAVIS_TAG" ]
|
||||
then
|
||||
echo "Release already in Play Store Console"
|
||||
elif [ "$TRAVIS_BRANCH" = "master" ]
|
||||
then
|
||||
./gradlew assembleRelease appDistributionUploadRelease publishReleaseBundle
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Building PR"
|
||||
./gradlew test
|
||||
./gradlew lint
|
||||
./gradlew ktlintCheck
|
||||
|
||||
elif [ -n "$TRAVIS_TAG" ]
|
||||
then
|
||||
|
||||
echo "Promoting Beta to Production"
|
||||
./gradlew promoteArtifact --from-track beta --promote-track production
|
||||
|
||||
elif [ "$TRAVIS_BRANCH" = "master" ]
|
||||
then
|
||||
|
||||
echo "Building Master"
|
||||
mkdir -p app/src/main/play/release-notes/en-US/
|
||||
git log --format=%s $(git rev-list --tags --max-count=1)..HEAD > app/src/main/play/release-notes/en-US/default.txt
|
||||
|
||||
export VERSION_CODE=`git rev-list --count HEAD`
|
||||
|
||||
./gradlew test
|
||||
./gradlew lint
|
||||
./gradlew ktlintCheck
|
||||
|
||||
./gradlew assembleRelease appDistributionUploadRelease publishReleaseBundle
|
||||
fi
|
||||
|
|
|
@ -58,4 +58,4 @@ def vName = "X.X.X-${vCode}"
|
|||
```
|
||||
Merge that into master and allow the build to complete and validate on the beta channel. (Deploy there automatic)
|
||||
|
||||
Once ready to move to production log into play store -> Release Management -> App Releases -> Beta -> Promote to Production
|
||||
Once ready to move to production tag the master branch and travis will start the promotion from beta -> production.
|
||||
|
|
|
@ -14,7 +14,7 @@ buildscript {
|
|||
}
|
||||
dependencies {
|
||||
classpath 'com.google.firebase:firebase-appdistribution-gradle:1.3.1'
|
||||
classpath 'com.github.triplet.gradle:play-publisher:2.5.0'
|
||||
classpath 'com.github.triplet.gradle:play-publisher:2.6.2'
|
||||
classpath 'de.mannodermaus.gradle.plugins:android-junit5:1.5.2.0'
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ android {
|
|||
|
||||
firebaseAppDistribution {
|
||||
serviceCredentialsFile = "firebaseAppDistributionServiceCredentialsFile.json"
|
||||
releaseNotesFile = "CHANGES.md"
|
||||
releaseNotesFile = "src/main/play/release-notes/en-US/default.txt"
|
||||
groups = "continuous-deployment"
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ dependencies {
|
|||
implementation "androidx.appcompat:appcompat:$appCompatVersion"
|
||||
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutversion"
|
||||
implementation "androidx.preference:preference-ktx:1.1.0"
|
||||
implementation 'com.google.android.material:material:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.1.0'
|
||||
|
||||
implementation("com.jakewharton.threetenabp:threetenabp:$threeTenAbpVersion") {
|
||||
exclude group: 'org.threeten'
|
||||
|
@ -112,7 +112,7 @@ dependencies {
|
|||
implementation "com.google.firebase:firebase-iid:20.0.2"
|
||||
implementation "com.google.firebase:firebase-messaging:20.1.0"
|
||||
|
||||
implementation "androidx.work:work-runtime-ktx:2.3.0"
|
||||
implementation "androidx.work:work-runtime-ktx:2.3.1"
|
||||
|
||||
testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spek2Version"
|
||||
testImplementation "org.spekframework.spek2:spek-runner-junit5:$spek2Version"
|
||||
|
|
|
@ -52,7 +52,7 @@ class SettingsFragment : PreferenceFragmentCompat(), SettingsView {
|
|||
onChangeUrlValidator
|
||||
|
||||
findPreference<Preference>("version")?.let {
|
||||
it.summary = "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})"
|
||||
it.summary = BuildConfig.VERSION_NAME
|
||||
}
|
||||
|
||||
presenter.onCreate()
|
||||
|
|
|
@ -7,7 +7,7 @@ ext {
|
|||
jacksonVersion = '2.10.1'
|
||||
appCompatVersion = '1.1.0'
|
||||
constraintLayoutversion = '1.1.3'
|
||||
coroutinesVersion = '1.3.2'
|
||||
coroutinesVersion = '1.3.3'
|
||||
daggerVersion = '2.25.2'
|
||||
threeTenAbpVersion = '1.2.1'
|
||||
threeTenBpVersion = '1.4.0'
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,5 @@
|
|||
#Sun Mar 31 01:55:59 PDT 2019
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-all.zip
|
||||
|
|
22
gradlew
vendored
22
gradlew
vendored
|
@ -1,5 +1,21 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
|
@ -28,7 +44,7 @@ APP_NAME="Gradle"
|
|||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
@ -109,8 +125,8 @@ if $darwin; then
|
|||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
|
18
gradlew.bat
vendored
18
gradlew.bat
vendored
|
@ -1,3 +1,19 @@
|
|||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
|
@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
|
|||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
|
Loading…
Reference in New Issue
Block a user