Skip to content

Commit c35070a

Browse files
authored
Tweak Makefile (#436)
Create a top level `pgroll` rule. Add separate `clean` and `generate` rules.
1 parent 2d2b4a0 commit c35070a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
.PHONY: generate lint examples test
1+
.PHONY: pgroll generate format lint examples test
22

3-
generate:
3+
pgroll:
4+
go build
5+
6+
clean:
7+
go clean
8+
9+
format:
410
# Format JSON schema
5-
docker run --rm -v $$PWD/schema.json:/mnt/schema.json node:alpine npx prettier /mnt/schema.json --parser json --tab-width 2 --single-quote --trailing-comma all --no-semi --arrow-parens always --print-width 120 > schema.json.tmp
6-
mv schema.json.tmp schema.json
11+
docker run --rm -v $$PWD/schema.json:/mnt/schema.json node:alpine npx prettier /mnt/schema.json --parser json --tab-width 2 --single-quote --trailing-comma all --no-semi --arrow-parens always --print-width 120 --write
712

13+
generate: format
814
# Generate the types from the JSON schema
915
# Temporarily use the `surjection/go-jsonschema` image because we need https://github.com/omissis/go-jsonschema/pull/220
1016
# Use the official `omissis/gojsonschema` image once 0.17.0 is released.

0 commit comments

Comments
 (0)