mirror of
https://github.com/android-password-store/Android-Password-Store.git
synced 2025-09-06 04:51:38 +02:00
Fix snapshot/pull-request build conflict
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
parent
8a91e862ab
commit
99c9c76781
2
.github/workflows/deploy_snapshot.yml
vendored
2
.github/workflows/deploy_snapshot.yml
vendored
|
@ -25,6 +25,8 @@ jobs:
|
|||
|
||||
- name: Build release app
|
||||
run: ./gradlew :app:assembleRelease
|
||||
env:
|
||||
SNAPSHOT: "true"
|
||||
|
||||
- name: Clean secrets
|
||||
run: release/signing-cleanup.sh
|
||||
|
|
|
@ -23,14 +23,16 @@ final def gitHash = { ->
|
|||
stdout.toString().trim()
|
||||
}
|
||||
|
||||
static final def isCi() {
|
||||
return System.env['GITHUB_WORKFLOW'] != null
|
||||
static final def isSnapshot() {
|
||||
return System.env['GITHUB_WORKFLOW'] != null && System.env['SNAPSHOT'] != null
|
||||
}
|
||||
|
||||
android {
|
||||
android.applicationVariants.all { final variant ->
|
||||
variant.outputs.all {
|
||||
outputFileName = "aps_${isCi() ? versions.versionName : gitHash()}.apk"
|
||||
if (isSnapshot()) {
|
||||
android.applicationVariants.all { final variant ->
|
||||
variant.outputs.all {
|
||||
outputFileName = "aps_${versions.versionName}.apk"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue