-
Notifications
You must be signed in to change notification settings - Fork 317
/
makefile
43 lines (31 loc) · 1.34 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
38
39
40
41
42
43
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
GOOS?=darwin
GOARCH?=arm64
MAKEFLAGS += --silent
VERSION=$$(git describe --tags)
build:
CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$(VERSION)" -o terraform-provider-keycloak_$(VERSION)
build-example: build
mkdir -p example/.terraform/plugins/terraform.local/keycloak/keycloak/4.0.0/$(GOOS)_$(GOARCH)
mkdir -p example/terraform.d/plugins/terraform.local/keycloak/keycloak/4.0.0/$(GOOS)_$(GOARCH)
cp terraform-provider-keycloak_* example/.terraform/plugins/terraform.local/keycloak/keycloak/4.0.0/$(GOOS)_$(GOARCH)/
cp terraform-provider-keycloak_* example/terraform.d/plugins/terraform.local/keycloak/keycloak/4.0.0/$(GOOS)_$(GOARCH)/
local: deps
docker compose up --build -d
./scripts/wait-for-local-keycloak.sh
./scripts/create-terraform-client.sh
deps:
./scripts/check-deps.sh
fmt:
gofmt -w -s $(GOFMT_FILES)
test: fmtcheck vet
go test $(TEST)
testacc: fmtcheck vet
go test -v github.com/keycloak/terraform-provider-keycloak/keycloak
TF_ACC=1 CHECKPOINT_DISABLE=1 go test -v -timeout 60m -parallel 4 github.com/keycloak/terraform-provider-keycloak/provider $(TESTARGS)
fmtcheck:
lineCount=$(shell gofmt -l -s $(GOFMT_FILES) | wc -l | tr -d ' ') && exit $$lineCount
vet:
go vet ./...
user-federation-example:
cd custom-user-federation-example && ./gradlew shadowJar