From 3e62cf46253c8b55ad2e343064e83d41bb48f7a8 Mon Sep 17 00:00:00 2001 From: Ben Reedy Date: Sun, 12 Mar 2023 18:41:19 +1000 Subject: [PATCH] fix(ci): Update Makefile with upstream changes --- GNUmakefile | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 1ef2216..66f37e7 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -3,30 +3,32 @@ BINARY=packer-plugin-${NAME} COUNT?=1 TEST?=$(shell go list ./...) +HASHICORP_PACKER_PLUGIN_SDK_VERSION?=$(shell go list -m github.com/hashicorp/packer-plugin-sdk | cut -d " " -f2) .PHONY: dev build: @go build -o ${BINARY} -generate: - @go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@latest - @go generate -v ./... - -ci-release-docs: - @go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@latest - @packer-sdc renderdocs -src docs -partials docs-partials/ -dst docs/ - @/bin/sh -c "[ -d docs ] && zip -r docs.zip docs/" - dev: build @mkdir -p ~/.packer.d/plugins/ @mv ${BINARY} ~/.packer.d/plugins/${BINARY} -run-example: dev - @packer build ./example - test: @go test -count $(COUNT) $(TEST) -timeout=3m +install-packer-sdc: ## Install packer sofware development command + @go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@${HASHICORP_PACKER_PLUGIN_SDK_VERSION} + +ci-release-docs: install-packer-sdc + @packer-sdc renderdocs -src docs -partials docs-partials/ -dst docs/ + @/bin/sh -c "[ -d docs ] && zip -r docs.zip docs/" + +plugin-check: install-packer-sdc build + @packer-sdc plugin-check ${BINARY} + testacc: dev @PACKER_ACC=1 go test -count $(COUNT) -v $(TEST) -timeout=120m + +generate: install-packer-sdc + @go generate ./...