mirror of
https://github.com/home-assistant/android
synced 2024-10-02 22:34:46 +00:00
Enable publishing the Wear OS to Beta. (#1772)
* Enable publishing the Wear OS to Beta. * Make versionCode different for wear app.
This commit is contained in:
parent
51df8dd9a8
commit
8fbc55e97b
|
@ -21,9 +21,7 @@ runs:
|
|||
run: |
|
||||
COMMITS=`git rev-list --count HEAD`
|
||||
TAGS=`git tag | grep -v beta | wc -l`
|
||||
# Because for a while we were increasing by 2 rather than one we need an offset
|
||||
OFFSET=15
|
||||
VC=$((COMMITS+TAGS+OFFSET))
|
||||
VC=$(((COMMITS+TAGS) << 1))
|
||||
HASH=`git rev-parse --short HEAD`
|
||||
if [ "${{inputs.beta}}" = "true" ]; then
|
||||
VERSION=beta-$VC-$HASH
|
||||
|
|
2
.github/workflows/weekly.yaml
vendored
2
.github/workflows/weekly.yaml
vendored
|
@ -75,4 +75,4 @@ jobs:
|
|||
KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }}
|
||||
VERSION: ${{ steps.rel_number.outputs.version }}
|
||||
VERSION_CODE: ${{ steps.rel_number.outputs.version-code }}
|
||||
run: ./gradlew publishFullReleaseBundle || echo "Issue uploading Release, may just be nothing has changed"
|
||||
run: ./gradlew :app:publishFullReleaseBundle :wear:publishReleaseBundle || echo "Issue uploading Release, may just be nothing has changed"
|
||||
|
|
|
@ -2,6 +2,7 @@ plugins {
|
|||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
id("kotlin-kapt")
|
||||
id("com.github.triplet.play")
|
||||
}
|
||||
|
||||
android {
|
||||
|
@ -13,7 +14,8 @@ android {
|
|||
targetSdk = 30
|
||||
|
||||
versionName = System.getenv("VERSION") ?: "LOCAL"
|
||||
versionCode = System.getenv("VERSION_CODE")?.toIntOrNull() ?: 1
|
||||
// We add 1 because the app and wear versions need to have different version codes.
|
||||
versionCode = (System.getenv("VERSION_CODE")?.toIntOrNull() ?: 1) + 1
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
|
@ -62,6 +64,12 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
play {
|
||||
serviceAccountCredentials.set(file("playStorePublishServiceCredentialsFile.json"))
|
||||
track.set("beta")
|
||||
resolutionStrategy.set(com.github.triplet.gradle.androidpublisher.ResolutionStrategy.IGNORE)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":common"))
|
||||
|
||||
|
|
Loading…
Reference in a new issue