-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: deploy to maven Thanks for proposing a pull request. To help us review the request, please complete the following: - [x] sign contributor license agreement: https://developers.facebook.com/opensource/cla - [x] submit against our `:dev` branch, not `master`. - [x] describe the change (for example, what happens before the change, and after the change) Pull Request resolved: #542 Reviewed By: codytwinton Differential Revision: D13571878 Pulled By: jingping2015 fbshipit-source-id: aff6907bedcdc13db4b8fa9535115729d0611c92
- Loading branch information
1 parent
f3e6bf7
commit cdd808d
Showing
4 changed files
with
62 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,36 @@ | ||
language: android | ||
|
||
android: | ||
components: | ||
- build-tools-26 | ||
- build-tools-27.0.3 | ||
- android-26 | ||
- android-27 | ||
- extra | ||
|
||
- build-tools-26 | ||
- build-tools-27.0.3 | ||
- android-26 | ||
- android-27 | ||
- extra | ||
licenses: | ||
- android-sdk-preview-license-.+ | ||
- android-sdk-license-.+ | ||
- google-gdk-license-.+ | ||
|
||
before_install: | ||
- yes | sdkmanager "platforms;android-27" | ||
- chmod +x gradlew | ||
|
||
- android-sdk-preview-license-.+ | ||
- android-sdk-license-.+ | ||
- google-gdk-license-.+ | ||
before_install: | ||
- openssl aes-256-cbc -K $encrypted_e83d0815cd6c_key -iv $encrypted_e83d0815cd6c_iv | ||
-in secring.gpg.enc -out secring.gpg -d | ||
- yes | sdkmanager "platforms;android-27" | ||
- chmod +x gradlew | ||
branches: | ||
only: | ||
- master | ||
|
||
# Override the install and test so that we don't run integration tests | ||
install: | ||
- ./gradlew assemble | ||
|
||
- "./gradlew assemble" | ||
script: | ||
- ./gradlew :facebook:test -i | ||
- "./gradlew :facebook:test -i" | ||
- .travis/deploy.sh | ||
|
||
env: | ||
global: | ||
- # GPG_KEY_ID | ||
- secure: b54RmQZS4+RqvJGLM5tlosWshEQmygOpcpcVE2UXKdDuk0OHPwk+67dn20mbCOhdZJc0MQ51ot6jAPTnFzKqgnwb37KIgxWOTzVzv0uxWJ7SWI/5AU4CdU3G1s24PGZcDOJ0sfWCyH8xArnJToH0pBIo4PHeB6csGtKsgKp7aVM= | ||
- # GPG_KEY_PASSPHRASE | ||
- secure: CqDRGAfI/gwsUzgLTbrqfX+VMsLnOuk/aoH6fXMW8lqE55/aJzHqdhuOuiVvJsBa+tVuxV06FI/3AZKYxzYgNt55lNU6JurOSeawE5WN8zhKdSNxtKlFypRQqAV0Od5MXrTY6pKgc3JSoM2WOx8+8AUaYMfycv4qNyu14E47n90= | ||
- # NEXUS_USERNAME | ||
- secure: B7LncUtbP4gpLDa2aMFLnVKcAWzp76ZRAH5EHPFVP70UCEMJjPnTxP/OPV8QOFdNW98duuro8XQrr7CEjVaYWcLddyp8WZpulnj8OtqzlaQ2HSWQYdZPPBdWeTj20B994nPGaqg1N0t0ojdH6zj7cOIE2kqro7RrRYovpYq6bVk= | ||
- # NEXUS_PASSWORD | ||
- secure: OhGzIa1cnT7n6f8MatrhyeJ0KldqB+KsrE47L35+yq9KiuVCZ/4CEawwrtxNVJn02lrue/0ZM9Ya9UwfMy6kCv3rx7rkNyj6ySylUqRjkfOZheN8QkS4ujsDZTYZyROxtc3ISO1hunIzxXsOeGCopPC3FaVbLQeupa3v/5HJrQ0= |
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,33 @@ | ||
# Copyright 2015-present Facebook. All Rights Reserved. | ||
|
||
# shellcheck disable=SC2086 | ||
# shellcheck disable=SC2006 | ||
|
||
VERSION_CLASS=facebook-core/src/main/java/com/facebook/FacebookSdkVersion.java | ||
id1=`git log -n 1 --pretty=format:%H -- $VERSION_CLASS` | ||
id2=`git show -n 1 --pretty=format:%H` | ||
if [ "$id1" == "$id2" ]; then | ||
FB_SRC_FOLDERS=( | ||
'facebook-core' | ||
'facebook-common' | ||
'facebook-login' | ||
'facebook-share' | ||
'facebook-places' | ||
'facebook-messenger' | ||
'facebook-applinks' | ||
'facebook-marketing' | ||
'facebook' | ||
) | ||
|
||
for (( i = 0; i < ${#FB_SRC_FOLDERS[@]}; i++ )) | ||
do | ||
FOLDER=${FB_SRC_FOLDERS[$i]} | ||
echo "Publishing $FOLDER SDK to maven central"; | ||
cp secring.gpg $FOLDER/ | ||
./gradlew uploadArchives -p $FOLDER -PossrhUsername=${NEXUS_USERNAME} -PossrhPassword=${NEXUS_PASSWORD} -Psigning.keyId=${GPG_KEY_ID} -Psigning.password=${GPG_KEY_PASSPHRASE} -Psigning.secretKeyRingFile=secring.gpg || die "Failed to publish $FOLDER SDK to maven central" | ||
rm $FOLDER/secring.gpg | ||
done | ||
|
||
else | ||
echo 'No version update for this commit.'; | ||
fi |
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
Binary file not shown.