-
Notifications
You must be signed in to change notification settings - Fork 99
/
Makefile
38 lines (31 loc) · 1013 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
32
33
34
35
36
37
38
VERSION ?= $(shell git describe --tags 2> /dev/null || echo v0)
BASE_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
VALIDATOR_IMG := cnabio/cnab-spec.ajv
.PHONY: build-validator
build-validator:
@docker build -f Dockerfile.ajv -t $(VALIDATOR_IMG) .
.PHONY: validate
validate: build-validator
@docker run --rm \
-v $(BASE_DIR):/root \
-w /root \
$(VALIDATOR_IMG) ./scripts/validate.sh
.PHONY: validate-url
validate-url: build-validator
@docker run --rm \
-v $(BASE_DIR):/root \
-w /root \
$(VALIDATOR_IMG) ./scripts/validate-url.sh
.PHONY: build-validator-local
build-validator-local:
@npm install -g ajv-cli@3.3.0
.PHONY: validate-local
validate-local: build-validator-local
./scripts/validate.sh
.PHONY: validate-url-local
validate-url-local: build-validator-local
./scripts/validate-url.sh
# AZURE_STORAGE_CONNECTION_STRING will be used for auth in the following target
.PHONY: publish
publish:
@az storage blob upload-batch -d schema/$(VERSION) -s schema