-
Notifications
You must be signed in to change notification settings - Fork 2
/
gomake.mak
34 lines (33 loc) · 863 Bytes
/
gomake.mak
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
# Binary name
BINARY=imageCreator
# Builds the project
build:
go build -o ${BINARY}
go test -v
# Installs our project: copies binaries
install:
go install
release:
# Clean
go clean
rm -rf *.gz
# Build for mac
go build
tar czvf imageCreator-mac64-${VERSION}.tar.gz ./imageCreator
# Build for linux
go clean
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
tar czvf imageCreator-linux64-${VERSION}.tar.gz ./imageCreator
# Build for linux arm
go clean
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build
tar czvf imageCreator-linux-arm-${VERSION}.tar.gz ./imageCreator
# Build for win
go clean
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build
tar czvf imageCreator-win64-${VERSION}.tar.gz ./imageCreator.exe
go clean
# Cleans our projects: deletes binaries
clean:
go clean
.PHONY: clean build