forked from cvbarros/terraform-provider-teamcity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (21 loc) · 914 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
export GO111MODULE=on
GIT_COMMIT=$(shell git rev-parse HEAD)
GIT_DIRTY=$(shell test -n "`git status --porcelain`" && echo "+CHANGES" || true)
BUILD_DATE=$(shell date '+%Y-%m-%d-%H:%M:%S')
BUILDER_IMAGE=cvbarros/terraform-provider-teamcity-builder
default: test
build:
GO111MODULE=on go build -o ./bin/terraform-provider-teamcity_${VERSION}
install: build
cp ./bin/terraform-provider-teamcity_${VERSION} ~/.terraform.d/plugins/
clean:
rm -rf ./bin
builder-action:
docker run -e GITHUB_WORKSPACE='/github/workspace' -e GITHUB_REPOSITORY='terraform-provider-teamcity' -e GITHUB_REF='v0.0.1-alpha' --name terraform-provider-teamcity-builder $(BUILDER_IMAGE):latest
builder-image:
docker build .github/builder --tag $(BUILDER_IMAGE)
clean_samples:
find ./examples -name '*.tfstate' -delete
find ./examples -name ".terraform" -type d -exec rm -rf "{}" \;
fmt_samples:
terraform fmt -recursive examples/