diff options
| -rw-r--r-- | ios/.gitignore | 1 | ||||
| -rwxr-xr-x | ios/update-relays.sh | 17 |
2 files changed, 17 insertions, 1 deletions
diff --git a/ios/.gitignore b/ios/.gitignore index 7fbc0584a7..b640658020 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -4,6 +4,7 @@ ## Generated assets Assets/relays.json +Assets/api-ip-address.json ## Build generated build/ diff --git a/ios/update-relays.sh b/ios/update-relays.sh index 97fd3beafc..26772bdcee 100755 --- a/ios/update-relays.sh +++ b/ios/update-relays.sh @@ -5,7 +5,10 @@ if [ -z "$PROJECT_DIR" ]; then exit 1 fi -RELAYS_FILE="$PROJECT_DIR/Assets/relays.json" +ASSETS_DIR_PATH="$PROJECT_DIR/Assets" + +RELAYS_FILE="$ASSETS_DIR_PATH/relays.json" +API_IP_ADDRESS_LIST_FILE="$ASSETS_DIR_PATH/api-ip-address.json" if [ $CONFIGURATION == "Release" ]; then echo "Remove relays file" @@ -14,9 +17,21 @@ if [ $CONFIGURATION == "Release" ]; then else echo "Relays file does not exist" fi + + echo "Remove API address list file" + if [ -f "$API_IP_ADDRESS_LIST_FILE" ]; then + rm "$API_IP_ADDRESS_LIST_FILE" + else + echo "API IP address list file does not exist" + fi fi if [ ! -f "$RELAYS_FILE" ]; then echo "Download relays file" curl https://api.mullvad.net/app/v1/relays -s -o "$RELAYS_FILE" fi + +if [ ! -f "$API_IP_ADDRESS_LIST_FILE" ]; then + echo "Download API address list file" + curl https://api.mullvad.net/app/v1/api-addrs -s -o "$API_IP_ADDRESS_LIST_FILE" +fi
\ No newline at end of file |
