-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (26 loc) · 930 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.PHONY: build
fmt:
@go fmt ./...
tidy:
@go mod tidy
build: tidy
@go build -o packer-plugin-testinfra
install: build
@packer plugins install --path ./packer-plugin-testinfra 'github.com/mschuchard/testinfra'
unit:
@go test -v ./provisioner
accept: install
# start vbox machine for ssh communicator testing
@PACKER_ACC=1 go test -v ./main_test.go -timeout=1m
install-packer-sdc:
@go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@latest
#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
@~/go/bin/packer-sdc plugin-check packer-plugin-testinfra
generate: install-packer-sdc
export PATH="${PATH}:$(shell go env GOPATH)/bin"
@go generate ./...
#packer-sdc renderdocs -src ./docs -dst ./.docs -partials ./docs-partials
test: unit accept plugin-check