-
Notifications
You must be signed in to change notification settings - Fork 56
/
Makefile
48 lines (40 loc) · 943 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
38
39
40
41
42
43
44
45
46
47
48
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := all
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
GO ?= go
TESTARGS ?=
BINARY_NAME := terraform-provider-statuscake
ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
endif
.RECIPEPREFIX =
.PHONY: all
all: build testacc
.PHONY: help
help:
@echo "Usage: make <target>"
@echo
@echo "Targets:"
@echo " all Build and test the project (default)"
@echo " build Build the project"
@echo " testacc Run acceptance tests"
@echo " clean Clean the project"
.PHONY: build
build: $(BINARY_NAME)
@echo "done"
$(BINARY_NAME):
@echo "building provider"
@go build -o $@
.PHONY: docs
docs:
@go generate ./...
.PHONY: testacc
testacc:
TF_ACC=1 $(GO) test ./... -v $(TESTARGS) -timeout 120m
.PHONY: clean
clean:
@rm -f $(BINARY_NAME)