Skip to content

Commit bc272c3

Browse files
use ip from ipconfig
1 parent 2a8ce8f commit bc272c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/local-circ.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ done
1717

1818
# Get IP and UUID for MACOS
1919
LOCAL_IP=$(ipconfig getifaddr en0)
20-
UUID=$(psql -U palace -h localhost -d circ -c "SELECT UUID FROM public.libraries ORDER BY id ASC" -t | xargs)
20+
UUID=$(psql -U palace -h "$LOCAL_IP" -d circ -c "SELECT UUID FROM public.libraries ORDER BY id ASC" -t | xargs)
2121

2222
# Validate values
2323
[ -z "$LOCAL_IP" ] || [ -z "$UUID" ] && { echo "Error: Failed to get IP or UUID"; exit 1; }
2424

2525
# Replace the values using sed
26-
sed -i '' "s|val circURL = \"LOCAL_IP_ADDRESS\"|val circURL = \"$LOCAL_IP\"|g" "$GRADLE_FILE"
26+
sed -i '' "s|val circURL = \"LOCAL_IP_ADDRESS\"|val circURL = \"http://$LOCAL_IP:6500\"|g" "$GRADLE_FILE"
2727
sed -i '' "s|val libProvider = \"LOCAL_CIRC_LIBRARY_UUID\"|val libProvider = \"$UUID\"|g" "$GRADLE_FILE"
2828

2929
echo "Updated IP: $LOCAL_IP"

0 commit comments

Comments
 (0)