forked from hashicorp/packer-plugin-hashicups
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
35 lines (25 loc) · 783 Bytes
/
GNUmakefile
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
NAME=hashicups
BINARY=packer-plugin-${NAME}
COUNT?=1
TEST?=$(shell go list ./...)
.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
run-hashicups-api:
@cd example/hashicups_api && docker-compose up -d
test:
@go test -count $(COUNT) $(TEST) -timeout=3m
testacc: dev
@PACKER_ACC=1 go test -count $(COUNT) -v $(TEST) -timeout=120m