diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2021-11-25 12:25:40 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2021-12-16 15:01:01 +0100 |
| commit | bcee2b30f63460760b2ffa1a6b43995d13f58f2c (patch) | |
| tree | cc527207d10d8df888c29b9f2fe23b6f69e22a9e | |
| parent | f249bc175d21c3f732541266be9004700a913487 (diff) | |
| download | mullvadvpn-bcee2b30f63460760b2ffa1a6b43995d13f58f2c.tar.xz mullvadvpn-bcee2b30f63460760b2ffa1a6b43995d13f58f2c.zip | |
Bundle api IP addresses with the app
| -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 |
