Skip to content

Commit dac42d9

Browse files
committed
install packer-sdc at the version from deps
1 parent b1b9980 commit dac42d9

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

GNUmakefile

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ BINARY=packer-plugin-${NAME}
33

44
COUNT?=1
55
TEST?=$(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

@@ -13,21 +14,23 @@ dev: build
1314
@mkdir -p ~/.packer.d/plugins/
1415
@mv ${BINARY} ~/.packer.d/plugins/${BINARY}
1516

16-
run-example: dev
17-
@packer build ./example
17+
test:
18+
@go test -race -count $(COUNT) $(TEST) -timeout=3m
1819

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}
2122

22-
ci-release-docs: install-gen-deps
23+
ci-release-docs: install-packer-sdc
2324
@packer-sdc renderdocs -src docs -partials docs-partials/ -dst docs/
2425
@/bin/sh -c "[ -d docs ] && zip -r docs.zip docs/"
2526

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}
3129

3230
testacc: dev
3331
@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

Comments
 (0)