git.iko.soy/rowtype-yoga/package-sets
on psc-0.14.0-20210406 help sign in
rowtype-yoga/package-sets/verify-packages-in-registry.sh
25 lines 824 B history raw
1#!/usr/bin/env nix-shell
2#!nix-shell -i bash
4set -euo pipefail
6# This script checks that all the packages in the set are present in the registry
8wget -q https://raw.githubusercontent.com/purescript/registry/master/new-packages.json
9wget -q https://raw.githubusercontent.com/purescript/registry/master/bower-packages.json
11REGISTRY=$(cat bower-packages.json new-packages.json | jq -s 'map(keys) | add | unique | map (sub("purescript-";""))')
12PKGSET=$(cat packages.json | jq -s 'map(keys) | add')
14RESULT=$(jq -n --argjson registry "${REGISTRY}" --argjson pkgset "${PKGSET}" '$pkgset-$registry')
16rm new-packages.json bower-packages.json
18if [ "${RESULT}" == "[]" ]; then
19 echo "[SUCCESS] All packages are in the registry"
20 exit 0
21else
22 echo "[ERROR] Found some packages not in the registry:"
23 echo $RESULT
24 exit 1
25fi