forked from hashicorp/packer-plugin-yandex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGNUmakefile
32 lines (23 loc) · 793 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
NAME=yandex
BINARY=packer-plugin-${NAME}
COUNT?=1
TEST?=$(shell go list ./...)
.PHONY: dev
build:
@go build -o ${BINARY}
dev: build
@mkdir -p ~/.packer.d/plugins/
@mv ${BINARY} ~/.packer.d/plugins/${BINARY}
test:
@go test -race -count $(COUNT) $(TEST) -timeout=3m
install-gen-deps: ## Install dependencies for code generation
# packer-sdc allows to code generate everything needed to generate docs and
# HCL2 specific code.
@go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@latest
ci-release-docs: install-gen-deps
@packer-sdc renderdocs -src docs -partials docs-partials/ -dst docs/
@/bin/sh -c "[ -d docs ] && zip -r docs.zip docs/"
testacc: dev
@PACKER_ACC=1 go test -count $(COUNT) -v $(TEST) -timeout=120m
generate: install-gen-deps
@go generate ./...