Check $FABRIC_KEY availability in CircleCI (#506)
* Check $FABRIC_KEY in CircleCI * Remove config scripts
This commit is contained in:
parent
4b88c33534
commit
cda67427fa
|
@ -132,9 +132,11 @@ jobs:
|
|||
|
||||
echo -e "VERSIONCODE=$CIRCLE_BUILD_NUM" >> ./gradle.properties
|
||||
|
||||
echo -e "" > ./app/fabric.properties
|
||||
echo -e "apiKey=$FABRIC_KEY" >> ./app/fabric.properties
|
||||
echo -e "apiSecret=$FABRIC_SECRET" >> ./app/fabric.properties
|
||||
if [[ $FABRIC_KEY ]]; then
|
||||
echo -e "" > ./app/fabric.properties
|
||||
echo -e "apiKey=$FABRIC_KEY" >> ./app/fabric.properties
|
||||
echo -e "apiSecret=$FABRIC_SECRET" >> ./app/fabric.properties
|
||||
fi
|
||||
|
||||
- run:
|
||||
name: Install Android Depedencies
|
||||
|
|
|
@ -28,7 +28,6 @@ build/
|
|||
.idea
|
||||
.gradle
|
||||
local.properties
|
||||
fabric.properties
|
||||
*.iml
|
||||
|
||||
# node.js
|
||||
|
|
|
@ -28,11 +28,6 @@ Follow the [React Native Getting Started Guide](https://facebook.github.io/react
|
|||
$ npm install -g react-native-cli
|
||||
$ npm install
|
||||
```
|
||||
- Configuration
|
||||
```bash
|
||||
$ npm run fabric-ios --key="YOUR_API_KEY" --secret="YOUR_API_SECRET"
|
||||
$ npm run fabric-android --key="YOUR_API_KEY" --secret="YOUR_API_SECRET"
|
||||
```
|
||||
|
||||
- Run application
|
||||
```bash
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
apiKey=ef3f46fdf18479fd3e1b9b78d0ec73751a255e14
|
||||
apiSecret=e8e3d04c28bc04acd009484da5bb9d1440c4f53851564e9f95c3225ec8b0bc76
|
|
@ -1,19 +0,0 @@
|
|||
# #!/bin/bash
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
--key=*) key="${1#*=}"; shift 1;;
|
||||
--secret=*) secret="${1#*=}"; shift 1;;
|
||||
--key|--secret) echo "$1 requires an argument" >&2; exit 1;;
|
||||
|
||||
-*) echo "unknown option: $1" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -z ${key} || -z ${secret} ]]
|
||||
then
|
||||
echo 'Usage: yarn fabric-android --key="YOUR_API_KEY" --secret="YOUR_API_SECRET"'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "apiKey=${key}" > ./android/app/fabric.properties
|
||||
echo "apiSecret=${secret}" >> ./android/app/fabric.properties
|
|
@ -1,19 +0,0 @@
|
|||
# #!/bin/bash
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
--key=*) key="${1#*=}"; shift 1;;
|
||||
--secret=*) secret="${1#*=}"; shift 1;;
|
||||
--key|--secret) echo "$1 requires an argument" >&2; exit 1;;
|
||||
|
||||
-*) echo "unknown option: $1" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -z ${key} || -z ${secret} ]]
|
||||
then
|
||||
echo 'Usage: yarn fabric-ios --key="YOUR_API_KEY" --secret="YOUR_API_SECRET"'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/usr/libexec/PlistBuddy -c "Set Fabric:APIKey ${key}" ./ios/RocketChatRN/Info.plist
|
||||
echo "./Fabric.framework/run ${key} ${secret}" > ./ios/RocketChatRN/Fabric.sh
|
Loading…
Reference in New Issue