Skip to content

Commit a247e19

Browse files
committed
Experiment with fetching the JSON of all packages
1 parent 70d9261 commit a247e19

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

netlify.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ sleep 60s
3434

3535
# Now kill the registry and start in "full mode" (with the mirrored database)
3636
kill -9 $PID_REGISTRY || true
37-
./dub-registry &
37+
./dub-registry --no-monitoring &
3838
PID_REGISTRY=$!
3939
sleep 10s
4040

@@ -56,6 +56,22 @@ kill -9 $PID_WGET || true
5656

5757
mv "127.0.0.1:8005" out
5858

59+
################################################################################
60+
# Download all JSON responses from the local registry
61+
################################################################################
62+
63+
mapfile -t packages < <(jq -r '.[] | .name' mirror.json)
64+
OUT=out/packages
65+
mkdir -p "$OUT"
66+
for package in "${packages[@]}" ; do
67+
echo "Downloading JSON for ${package}"
68+
curl -fsSL "http://localhost:8005/packages/${package}.json" > "${OUT}/${package}.json" || true
69+
done
70+
71+
################################################################################
72+
# Kill the running registry + mongod instance
73+
################################################################################
74+
5975
kill -9 $PID_MONGO || true
6076
kill -9 $PID_REGISTRY || true
6177
kill -9 $PID_MONGO || true

0 commit comments

Comments
 (0)