forked from purescript/package-sets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (25 loc) · 969 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
all: format generate
format:
@find src/ -iname "*.dhall" -exec dhall format --inplace {} \;
@echo formatted dhall files
generate: SHELL:=/usr/bin/env bash
generate:
@dhall-to-json --pretty <<< "./src/packages.dhall" > packages.json
@psc-package format
@echo generated to packages.json
setup: all setup-only
setup-only:
@echo '{ "name": "test-package", "set": "testing", "source": "", "depends": [] }' > psc-package.json
@mkdir -p .psc-package/testing/.set
@cp packages.json .psc-package/testing/.set/packages.json
@echo setup testing package set
psc-package2nix: setup
@echo '{ "name": "test-package", "set": "testing", "source": "", "depends": ' > psc-package.json
@jq 'keys' packages.json >> psc-package.json
@echo '}' >> psc-package.json
psc-package2nix
nix-shell install-deps.nix --run "echo installation complete."
ci: generate setup-only
echo "Checking if packages.json has changed..."
git diff --exit-code packages.json
psc-package verify