forked from vaerh/terraform-provider-routeros
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
41 lines (29 loc) · 1.88 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
VERSION=0.1.0
all: compile checksum clean
test:
/usr/bin/go test -timeout 30s github.com/vaerh/terraform-provider-routeros/routeros
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_v${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_linux_arm.zip terraform-provider-routeros_v${VERSION}
GOOS=linux GOARCH=arm64 go build -o terraform-provider-routeros_v${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_linux_arm64.zip terraform-provider-routeros_v${VERSION}
GOOS=linux GOARCH=386 go build -o terraform-provider-routeros_v${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_linux_386.zip terraform-provider-routeros_v${VERSION}
GOOS=linux GOARCH=amd64 go build -o terraform-provider-routeros_v${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_linux_amd64.zip terraform-provider-routeros_v${VERSION}
GOOS=windows GOARCH=amd64 go build -o terraform-provider-routeros_v${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_windows_amd64.zip terraform-provider-routeros_v${VERSION}
GOOS=windows GOARCH=386 go build -o terraform-provider-routeros_v${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_windows_386.zip terraform-provider-routeros_v${VERSION}
GOOS=darwin GOARCH=amd64 go build -o terraform-provider-routeros_v${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_darwin_amd64.zip terraform-provider-routeros_v${VERSION}
GOOS=darwin GOARCH=arm64 go build -o terraform-provider-routeros_v${VERSION} main.go
zip pkg/terraform-provider-routeros_${VERSION}_darwin_arm64.zip terraform-provider-routeros_v${VERSION}
checksum:
cd pkg && sha256sum *.zip > terraform-provider-routeros_${VERSION}_SHA256SUMS
clean:
rm terraform-provider-routeros_v${VERSION}