-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d05559
commit 637cb7d
Showing
4 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources xmlns:tools="http://schemas.android.com/tools"> | ||
<string name="app_name" translatable="false">Trail Sense (Staging)</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Takes 1 argument: path to signing config file | ||
|
||
# Signing config file format: | ||
# Path to keystore | ||
# Keystore password | ||
# Key alias | ||
# Key password | ||
# Destination folder | ||
|
||
# Assemble the APK | ||
sh "${BASH_SOURCE%/*}"/../gradlew assembleStaging \ | ||
-Pandroid.injected.signing.store.file=$(head -n 1 "$1") \ | ||
-Pandroid.injected.signing.store.password=$(head -n 2 "$1" | tail -n 1) \ | ||
-Pandroid.injected.signing.key.alias=$(head -n 3 "$1" | tail -n 1) \ | ||
-Pandroid.injected.signing.key.password=$(head -n 4 "$1" | tail -n 1) | ||
|
||
# Get the version name from the gradle file | ||
export VERSION_CODE=$(LC_ALL=C.UTF-8 grep -oP '(?<=versionCode = )\d+' "${BASH_SOURCE%/*}"/../app/build.gradle.kts) | ||
|
||
# Copy the files to the destination folder (line 5 of the signing config file) | ||
echo "Copying files to $(head -n 5 "$1" | tail -n 1)" | ||
cp "${BASH_SOURCE%/*}"/../app/build/outputs/apk/staging/app-staging.apk $(head -n 5 "$1" | tail -n 1)/${VERSION_CODE}-staging.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sh scripts/staging-builds.sh ../trail_sense_release_signing_config.txt |