File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010#
1111
1212# The api-gateway is exposed on port 8888 in docker-compose-dev.yml
13- gateway_public_port=8888
13+ # extract gateway information from running juno instance
14+ gateway_container_id=$( docker ps -q --filter " ancestor=juno-api-gateway" )
15+ gateway_container_port=$( docker port $gateway_container_id )
16+
17+ gateway_public_port=$( echo " $gateway_container_port " | grep -o " 0.0.0.0:[0-9]*" | cut -d' :' -f2) # MACOS version
1418
1519# grab doc yaml
16- curl -f " localhost:$gateway_public_port /docs-yaml" > docs-yaml
17- if [ $? -ne 0 ]; then
18- echo " Error: Failed to fetch docs-yaml. Is Juno running? (pnpm dev)"
19- exit 1
20- fi
20+ curl " localhost:$gateway_public_port /docs-yaml" > docs-yaml
2121
2222# run gen client sdk script
2323pnpm gen-client-sdk
Original file line number Diff line number Diff line change 1010#
1111
1212# The api-gateway is exposed on port 8888 in docker-compose-dev.yml
13- gateway_public_port=8888
13+ # Extract gateway information from running juno instance
14+ gateway_container_id=$( docker ps -q --filter " ancestor=juno-api-gateway" )
15+ gateway_container_port=$( docker port $gateway_container_id )
16+
17+ gateway_public_port=$( echo " $gateway_container_port " | grep -oP " 0.0.0.0:\K\d+" )
18+ # gateway_public_port=$(echo "$gateway_container_port" | grep -o "0.0.0.0:[0-9]*" | cut -d':' -f2) # MACOS version
1419
1520# grab doc yaml
16- curl -f " localhost:$gateway_public_port /docs-yaml" > docs-yaml
17- if [ $? -ne 0 ]; then
18- echo " Error: Failed to fetch docs-yaml. Is Juno running? (pnpm dev)"
19- exit 1
20- fi
21+ curl " localhost:$gateway_public_port /docs-yaml" > docs-yaml
2122
2223# run gen client sdk script
2324pnpm gen-client-sdk
You can’t perform that action at this time.
0 commit comments