-
Notifications
You must be signed in to change notification settings - Fork 35
/
Makefile
37 lines (28 loc) · 1.07 KB
/
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
default: build
build:
go build -o terraform-provider-buildkite -ldflags="-s -w -X main.version=$(shell git describe --tag)" .
.PHONY: build-snapshot
build-snapshot:
goreleaser build --snapshot --clean
.PHONY: docs
docs:
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
testfmt:
@test -z $(shell gofmt -l . buildkite | tee /dev/stderr)
vet:
go vet $(go list ./...)
test:
go test ./...
# Acceptance tests. This will create, manage and delete real resources in a real
# Buildkite organization!
testacc:
TF_ACC=1 go run gotest.tools/gotestsum --format testname --junitfile "junit-${BUILDKITE_JOB_ID}.xml" ./...
# Generate the Buildkite GraphQL schema file
schema:
go get github.com/suessflorian/gqlfetch/gqlfetch
go get github.com/Khan/genqlient/generate@v0.7.0
go get github.com/vektah/gqlparser/v2/validator@v2.5.15
go run github.com/suessflorian/gqlfetch/gqlfetch -endpoint https://graphql.buildkite.com/v1 -header "Authorization=Bearer $${BUILDKITE_GRAPHQL_TOKEN}" > schema.graphql
# Generate the GraphQL code
generate: schema
go run github.com/Khan/genqlient