-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (34 loc) · 1.5 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
44
45
46
BINARY=terraform-provider-tozny
VERSION=0.27.0
default: build
all: lint install
lint:
go vet ./...
go mod tidy
go fmt ./...
build:
go build -o ${BINARY}
install: build
mv ${BINARY} ~/.terraform.d/plugins/${BINARY}_v${VERSION}
clean:
rm ~/.terraform.d/plugins/${BINARY}_v${VERSION} || true
install-mac: build
# Build and move binary to implicit local file system location for a tozny third party provider
# https://www.terraform.io/docs/configuration/provider-requirements.html#in-house-providers
# https://www.terraform.io/upgrade-guides/0-13.html#in-house-providers
# https://www.terraform.io/docs/commands/cli-config.html#implied-local-mirror-directories
mkdir -p ~/Library/Application\ Support/io.terraform/plugins/registry.terraform.io/tozny/tozny/${VERSION}/darwin_amd64/
mv ${BINARY} ~/Library/Application\ Support/io.terraform/plugins/registry.terraform.io/tozny/tozny/${VERSION}/darwin_amd64/${BINARY}_v${VERSION}
install-mac-arm: build
mkdir -p ~/Library/Application\ Support/io.terraform/plugins/registry.terraform.io/tozny/tozny/${VERSION}/darwin_arm64/
mv ${BINARY} ~/Library/Application\ Support/io.terraform/plugins/registry.terraform.io/tozny/tozny/${VERSION}/darwin_arm64/${BINARY}_v${VERSION}
clean-mac:
rm -rf ~/Library/Application\ Support/io.terraform/plugins/registry.terraform.io/tozny/tozny/ || true
version:
git tag v${VERSION}
git push origin v${VERSION}
release:
goreleaser release --rm-dist
test:
./examples/realms/applications/roles/test.sh
./examples/realms/groups/test.sh