@@ -3,30 +3,34 @@ BINARY=packer-plugin-${NAME}
33
44COUNT? =1
55TEST? =$(shell go list ./...)
6+ HASHICORP_PACKER_PLUGIN_SDK_VERSION? =$(shell go list -m github.com/hashicorp/packer-plugin-sdk | cut -d " " -f2)
67
78.PHONY : dev
89
910build :
1011 @go build -o ${BINARY}
1112
12- generate :
13- @go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@latest
14- @go generate -v ./...
15-
16- ci-release-docs :
17- @go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@latest
18- @packer-sdc renderdocs -src docs -partials docs-partials/ -dst docs/
19- @/bin/sh -c " [ -d docs ] && zip -r docs.zip docs/"
20-
2113dev : build
2214 @mkdir -p ~ /.packer.d/plugins/
2315 @mv ${BINARY} ~ /.packer.d/plugins/${BINARY}
2416
25- run-example : dev
26- @packer build ./example
27-
2817test :
29- @go test -count $(COUNT ) $(TEST ) -timeout=3m
18+ @go test -race -count $(COUNT ) $(TEST ) -timeout=3m
19+
20+ install-packer-sdc : # # Install packer sofware development command
21+ @go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@${HASHICORP_PACKER_PLUGIN_SDK_VERSION}
22+
23+ ci-release-docs : install-packer-sdc
24+ @packer-sdc renderdocs -src docs -partials docs-partials/ -dst docs/
25+ @/bin/sh -c " [ -d docs ] && zip -r docs.zip docs/"
26+
27+ plugin-check : install-packer-sdc build
28+ @packer-sdc plugin-check ${BINARY}
3029
3130testacc : dev
32- @PACKER_ACC=1 go test -count $(COUNT ) -v $(TEST ) -timeout=120m
31+ @PACKER_ACC=1 go test -count $(COUNT ) -v $(TEST ) -timeout=120m
32+
33+ generate : install-packer-sdc
34+ @go generate ./...
35+ packer-sdc renderdocs -src ./docs -dst ./.docs -partials ./docs-partials
36+ # checkout the .docs folder for a preview of the docs
0 commit comments