Skip to content

Commit

Permalink
Merge pull request #135 from lbajolet-hashicorp/makefile_dev_use_pack…
Browse files Browse the repository at this point in the history
…er_install

makefile dev use packer install
  • Loading branch information
andrewsomething authored Mar 28, 2024
2 parents 7c02590 + 5e07177 commit 85471fa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
NAME=digitalocean
BINARY=packer-plugin-${NAME}
PLUGIN_FQN="$(shell grep -E '^module' <go.mod | sed -E 's/module *//')"

COUNT?=1
TEST?=$(shell go list ./...)
Expand All @@ -10,9 +11,9 @@ HASHICORP_PACKER_PLUGIN_SDK_VERSION?=$(shell go list -m github.com/hashicorp/pac
build:
@go build -o ${BINARY}

dev: build
@mkdir -p ~/.packer.d/plugins/
@mv ${BINARY} ~/.packer.d/plugins/${BINARY}
dev:
@go build -ldflags="-X '${PLUGIN_FQN}/version.VersionPrerelease=dev'" -o '${BINARY}'
packer plugins install --path ${BINARY} "$(shell echo "${PLUGIN_FQN}" | sed 's/packer-plugin-//')"

test:
@go test -v -race -count $(COUNT) ./... $(TEST) -timeout=3m
Expand Down

0 comments on commit 85471fa

Please sign in to comment.