Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
/build
29 changes: 11 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
JSONSCHEMA = jsonschema
SHELLCHECK = shellcheck
PYTHON = python3
JSONSCHEMA ?= jsonschema
SHELLCHECK ?= shellcheck
PYTHON ?= python3

# TODO: Extend `validate` to take a directory as argument
SCHEMAS = $(shell find schemas/ -type f -name '*.json')
Expand All @@ -9,30 +9,23 @@ TESTS = $(shell find test/ -type f -name '*.json')
all: common test
$(JSONSCHEMA) fmt schemas test meta --verbose

common: .always
.PHONY: common
common:
$(JSONSCHEMA) metaschema schemas meta --verbose
$(JSONSCHEMA) lint schemas meta --verbose
$(JSONSCHEMA) validate meta/schemas.json --verbose $(SCHEMAS)
$(JSONSCHEMA) validate meta/test.json --verbose $(TESTS)
$(SHELLCHECK) scripts/*.sh
./scripts/schemas-tests-mirror.sh

.PHONY: lint
lint: common
$(JSONSCHEMA) fmt schemas test meta --verbose --check

test: .always
.PHONY: test
test:
$(JSONSCHEMA) test ./test

generate: .always
$(PYTHON) scripts/generate-iso-currency.py

fetch: .always
$(PYTHON) scripts/fetch-xml.py \
"https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-one.xml" \
> data/six-group-iso-currency.json
$(PYTHON) scripts/fetch-xml.py \
"https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-three.xml" \
> data/six-group-iso-currency-historical.json


.always:
.PHONY: external
include generate/iso/currency/include.mk
external: $(EXTERNAL)
Loading