@@ -3,6 +3,7 @@ BINARY=packer-plugin-${NAME}
3
3
4
4
COUNT? =1
5
5
TEST? =$(shell go list ./...)
6
+ HASHICORP_PACKER_PLUGIN_SDK_VERSION? =$(shell go list -m github.com/hashicorp/packer-plugin-sdk | cut -d " " -f2)
6
7
7
8
.PHONY : dev
8
9
@@ -13,21 +14,23 @@ dev: build
13
14
@mkdir -p ~ /.packer.d/plugins/
14
15
@mv ${BINARY} ~ /.packer.d/plugins/${BINARY}
15
16
16
- run-example : dev
17
- @packer build ./example
17
+ test :
18
+ @go test -race -count $( COUNT ) $( TEST ) -timeout=3m
18
19
19
- install-gen-deps : # # Install dependencies for code generation
20
- @go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@latest
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}
21
22
22
- ci-release-docs : install-gen-deps
23
+ ci-release-docs : install-packer-sdc
23
24
@packer-sdc renderdocs -src docs -partials docs-partials/ -dst docs/
24
25
@/bin/sh -c " [ -d docs ] && zip -r docs.zip docs/"
25
26
26
- test :
27
- @go test -count $(COUNT ) $(TEST ) -timeout=3m
28
-
29
- generate : install-gen-deps
30
- go generate ./...
27
+ plugin-check : install-packer-sdc build
28
+ @packer-sdc plugin-check ${BINARY}
31
29
32
30
testacc : dev
33
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