Skip to content

Commit 641dc60

Browse files
author
Antonis
committed
Fixed #569: Make sure that official builds are only available for team & customers
1 parent 4a42f73 commit 641dc60

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

Examples/restcomm-olympus/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ android {
2828
}
2929

3030
defaultConfig {
31-
applicationId "org.restcomm.android.olympus"
31+
applicationId APPLICATION_ID
3232
// Using 18 instead of initial 16 due to introduction of UIAutomator for tests (and more specifically being able to handle system permission dialogs)
3333
// TODO: lets see if we can workaround this so that App can still use 16 which is good for backward compatibility, yet use 18 for tests
3434
// (most probably by using gradle product flavors). Notice though that this doesn't affect SDK so not critical

Examples/restcomm-olympus/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryErro
2222
#LIBRARY_ARTIFACT_ID=restcomm-android-sdk
2323
#LIBRARY_VERSION=1.0.0-beta6-SNAPSHOT
2424

25+
# defaultConfig applicationId
26+
APPLICATION_ID=org.restcomm.android.olympus
27+
2528
# Let's use my personal free xirsys account credentials for community, so that STUN/TURN works out of the box and eases adoption
2629
ICE_USERNAME = "atsakiridis"
2730
ICE_PASSWORD = "4e89a09e-bf6f-11e5-a15c-69ffdcc2b8a7"

scripts/start-ci-cd.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
# - ORG_GRADLE_PROJECT_TESTFAIRY_APIKEY: Secret key for using TestFairy API (only needed if uploading to TF)
3232
# - ORG_GRADLE_PROJECT_TESTFAIRY_AUTOUPDATE: Should we request from TestFairy to enable auto update for newly uploaded Olympus, true/false (only needed if uploading to TF)
3333
# - TESTFAIRY_APP_TOKEN: Test Fairy App token, so that only CI builds send stats to TF
34+
# - SKIP_OLYMPUS_UI_TESTS: skip espresso UI tests using Olympus, true/false
3435
# - SKIP_INTEGRATION_TESTS: skip Integration Tests, true/false (not implemented yet)
3536
# - SKIP_DOC_GENERATION: skip Reference Documentation generation, true/false
3637
# - SKIP_SDK_PUBLISH_TO_MAVEN_REPO: Should SDK library artifact be signed and uploaded to Maven Central, true/false

scripts/upload-olympus-to-testfairy.bash

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,29 @@ then
3131
fi
3232

3333
# Skip the signArchives task until we properly setup Travis for signing + upload of archives to Sonatype. Otherwise the build breaks
34-
cd Examples/restcomm-olympus && ./gradlew --quiet -x signArchives -x uploadArchives -x androidJavadocs -PtestfairyChangelog="Version: $ORG_GRADLE_PROJECT_VERSION_NAME+$ORG_GRADLE_PROJECT_VERSION_CODE, GitHub commit: $COMMIT_SHA1" testfairyDebug || exit 1
34+
cd Examples/restcomm-olympus || exit 1
35+
36+
if [ -z "$ICE_USERNAME" ] || [ -z "$PICE_PASSWORD" ] || [ -z "$PICE_DOMAIN" ]
37+
then
38+
echo "-- Error: ICE_USERNAME, ICE_PASSWORD and ICE_DOMAIN need to be set for premium Olympus to be built"
39+
exit 1
40+
fi
41+
42+
# Upload premium version to TF
43+
echo "-- Uploading premium version to Test Fairy"
44+
./gradlew --quiet -x signArchives -x uploadArchives -x androidJavadocs -PICE_USERNAME=$ICE_USERNAME -PICE_PASSWORD=$ICE_PASSWORD -PICE_DOMAIN=$ICE_DOMAIN -PAPPLICATION_ID="org.restcomm.android.olympus.premium" -PtestfairyChangelog="Version: $ORG_GRADLE_PROJECT_VERSION_NAME+$ORG_GRADLE_PROJECT_VERSION_CODE, GitHub commit: $COMMIT_SHA1, premium build" testfairyDebug || exit 1
45+
if [ $? -ne 0 ]
46+
then
47+
echo "-- Failed to build Olympus premium for uploading to TestFairy."
48+
exit 1
49+
fi
50+
51+
# Upload community version to TF, so that it gets a separate download point from premium (no need to specify APPLICATION_ID as default is for community)
52+
echo "-- Uploading community version to Test Fairy"
53+
./gradlew --quiet -x signArchives -x uploadArchives -x androidJavadocs -PtestfairyChangelog="Version: $ORG_GRADLE_PROJECT_VERSION_NAME+$ORG_GRADLE_PROJECT_VERSION_CODE, GitHub commit: $COMMIT_SHA1, community build" testfairyDebug || exit 1
3554
if [ $? -ne 0 ]
3655
then
37-
echo "-- Failed to build Olympus for uploading to TestFairy."
56+
echo "-- Failed to build Olympus community for uploading to TestFairy."
3857
exit 1
3958
fi
4059

0 commit comments

Comments
 (0)