This repository has been archived by the owner on Aug 30, 2023. It is now read-only.
forked from terraform-routeros/terraform-provider-routeros
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
49 lines (34 loc) · 2.02 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
VERSION=$(shell git describe --tags --abbrev=0)
.PHONY: docs debug
all: docs compile checksum clean
test:
/usr/bin/go test -timeout 30s github.com/vaerh/terraform-provider-routeros/routeros
docs:
go generate
debug:
go build -gcflags="all=-N -l" -o terraform-provider-routeros_${VERSION} main.go
compile:
mkdir -p pkg
echo "Removing previously built packages"
rm -rf pkg/*
echo "Compiling for every OS and Platform"
GOOS=linux GOARCH=arm go build -o terraform-provider-routeros_${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_linux_arm.zip terraform-provider-routeros_${VERSION}
GOOS=linux GOARCH=arm64 go build -o terraform-provider-routeros_${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_linux_arm64.zip terraform-provider-routeros_${VERSION}
GOOS=linux GOARCH=386 go build -o terraform-provider-routeros_${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_linux_386.zip terraform-provider-routeros_${VERSION}
GOOS=linux GOARCH=amd64 go build -o terraform-provider-routeros_${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_linux_amd64.zip terraform-provider-routeros_${VERSION}
GOOS=windows GOARCH=amd64 go build -o terraform-provider-routeros_${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_windows_amd64.zip terraform-provider-routeros_${VERSION}
GOOS=windows GOARCH=386 go build -o terraform-provider-routeros_${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_windows_386.zip terraform-provider-routeros_${VERSION}
GOOS=darwin GOARCH=amd64 go build -o terraform-provider-routeros_${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_darwin_amd64.zip terraform-provider-routeros_${VERSION}
GOOS=darwin GOARCH=arm64 go build -o terraform-provider-routeros_${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_darwin_arm64.zip terraform-provider-routeros_${VERSION}
checksum:
cd pkg && sha256sum *.zip > terraform-provider-routeros_${VERSION}_SHA256SUMS
clean:
rm terraform-provider-routeros_${VERSION}