forked from compose-spec/compose-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (22 loc) · 719 Bytes
/
Makefile
File metadata and controls
24 lines (22 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
DRIVE_PREFIX?=
ifeq ($(OS), Windows_NT)
DRIVE_PREFIX=C:
endif
.PHONY: spec
spec: ## generate spec.md file
$(eval $@_TMP_OUT := $(shell mktemp -d -t composespec-output.XXXXXXXXXX))
docker buildx build . \
--output type=local,dest=$($@_TMP_OUT) \
-f ./Dockerfile \
--target spec-update
rm -f spec.md
cp -R "$(DRIVE_PREFIX)$($@_TMP_OUT)"/out/spec.md ./spec.md
rm -rf "$(DRIVE_PREFIX)$($@_TMP_OUT)"/*
.PHONY: validate-spec
validate-spec: ## validate the spec.md does not change
@docker buildx build . \
-f ./Dockerfile \
--target spec-validate
.PHONY: sync-spec
sync-spec:
curl -L https://raw.githubusercontent.com/compose-spec/compose-go/refs/heads/main/schema/compose-spec.json -o schema/compose-spec.json