Skip to content

Commit b7accf1

Browse files
authored
Move version to jsonschema.json (#73)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent 19c98a5 commit b7accf1

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.DEFAULT_GOAL := all
22

33
JSONSCHEMA ?= jsonschema
4+
JQ ?= jq
45
SHELLCHECK ?= shellcheck
56
TAR ?= tar
67
ZIP ?= zip
@@ -13,9 +14,6 @@ RMRF ?= rm -rf
1314
SCHEMAS = $(shell find schemas/ -type f -name '*.json')
1415
TESTS = $(shell find test/ -type f -name '*.json')
1516

16-
# TODO: Add a version property to `jsonschema.json`
17-
VERSION = $(shell tr -d '\n\r' < VERSION)
18-
1917
include generated.mk
2018

2119
# TODO: Make `jsonschema fmt` automatically detect test files
@@ -46,6 +44,7 @@ test:
4644

4745
# TODO: Add a `jsonschema pkg` command instead
4846
.PHONY: dist
47+
VERSION = $(shell $(JQ) --raw-output '.["x-version"]' jsonschema.json)
4948
dist:
5049
$(RMRF) $@
5150
$(MKDIRP) $@

VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

generated.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
PYTHON ?= python3
2-
JQ ?= jq
32

43
define MAKE_SCHEMA
54
schemas/$1.json: templates/schemas/$1.jq $2.json

jsonschema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"description": "A growing collection of hand-crafted high-quality schemas by Sourcemeta",
44
"email": "hello@sourcemeta.com",
55
"github": "sourcemeta/std",
6-
"path": "./schemas"
6+
"path": "./schemas",
7+
"x-version": "0.2.0"
78
}

0 commit comments

Comments
 (0)