This repository has been archived by the owner on Feb 21, 2024. It is now read-only.
forked from fiveai/terraform-provider-freeipa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (57 loc) · 2.13 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
GOVARS := CGO_ENABLED=1
VERSION := $(shell git describe --tags --always --dirty="-dev")
# Currently arm and mac builds broken based on the cross compile dependencies.
release: clean github-release dist
github-release release \
--user fiveai \
--repo terraform-provider-freeipa \
--tag $(VERSION) \
--name $(VERSION)
--security-token $$GITHUB_TOKEN
# GNU/Linux - X86
github-release upload \
--user fiveai \
--repo terraform-provider-freeipa \
--tag $(VERSION) \
--name terraform-provider-freeipa_$(VERSION)-linux-amd64 \
--file terraform-provider-freeipa_$(VERSION)-linux-amd64 \
--security-token $$GITHUB_TOKEN
# arm
# github-release upload \
# --user fiveai \
# --repo terraform-provider-k8s \
# --tag $(VERSION) \
# --name terraform-provider-k8s_$(VERSION)-linux-arm \
# --file terraform-provider-k8s_$(VERSION)-linux-arm \
# --security-token $$GITHUB_TOKEN
#
# github-release upload \
# --user fiveai \
# --repo terraform-provider-k8s \
# --tag $(VERSION) \
# --name terraform-provider-k8s_$(VERSION)-linux-arm64 \
# --file terraform-provider-k8s_$(VERSION)-linux-arm64 \
# --security-token $$GITHUB_TOKEN
# macOS
# github-release upload \
# --user fiveai \
# --repo terraform-provider-k8s \
# --tag $(VERSION) \
# --name terraform-provider-k8s_$(VERSION)-darwin-amd64 \
# --file terraform-provider-k8s_$(VERSION)-darwin-amd64 \
# --security-token $$GITHUB_TOKEN
dist: goget
# GNU/Linux - X86
$(GOVARS) GOOS=linux GOARCH=amd64 go build -o terraform-provider-freeipa_$(VERSION)-linux-amd64
# arm
# $(GOVARS) GOOS=linux CC=arm-linux-gnueabi-gcc GOARCH=arm go build -o terraform-provider-k8s_$(VERSION)-linux-arm
# $(GOVARS) GOOS=linux GOARCH=arm64 go build -o terraform-provider-k8s_$(VERSION)-linux-arm64
# macOS
# $(GOVARS) GOOS=darwin GOARCH=amd64 go build -o terraform-provider-k8s_$(VERSION)-darwin-amd64
goget:
go get
clean:
rm -rf terraform-provider-freeipa*
github-release:
go get -u github.com/aktau/github-release
.PHONY: clean github-release