forked from openmrs/openmrs-contrib-android-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
31 lines (21 loc) · 789 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
# For the script to work, please set the following environment variables in Travis:
# KEYSTORE_PASSWORD - the password for release.keystore
# KEYSTORE_ALIAS_NAME - the alias name in release.keystore
# KEYSTORE_ALIAS_PASS - the password name for the alias
# KEYSTORE_GPG_PASSPHRASE - the password for decrypting release.keystore.gpg
# GITHUB_API_KEY - Your github api key with public repo access
# PUBLISHER_ACCOUNT_ID - Email ID for Developer Console
set -e
chmod +x gradlew
echo "Running tests..."
./gradlew test
if [[ -n "$TRAVIS_TAG" ]]; then
echo "Tagged build: building release..."
./gradlew build assembleRelease
echo "Publishing release to the Play store..."
./gradlew publishRelease
else
echo "Debug build: building..."
./gradlew assembleDebug lint
fi