-
Notifications
You must be signed in to change notification settings - Fork 55
/
Makefile
20 lines (16 loc) · 995 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
VERSION=$(shell git describe --tags)
build:
go build -ldflags "-s -w -X github.com/lemonade-command/lemonade/lemon.Version=$(VERSION)"
install:
go install -ldflags "-s -w -X github.com/lemonade-command/lemonade/lemon.Version=$(VERSION)"
release:
gox --arch 'amd64 386' --os 'windows linux darwin' --output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}/{{.Dir}}" -ldflags "-s -w -X github.com/lemonade-command/lemonade/lemon.Version=$(VERSION)"
zip pkg/lemonade_windows_386.zip dist/lemonade_windows_386/lemonade.exe -j
zip pkg/lemonade_windows_amd64.zip dist/lemonade_windows_amd64/lemonade.exe -j
tar zcvf pkg/lemonade_linux_386.tar.gz -C dist/lemonade_linux_386/ lemonade
tar zcvf pkg/lemonade_linux_amd64.tar.gz -C dist/lemonade_linux_amd64/ lemonade
tar zcvf pkg/lemonade_darwin_386.tar.gz -C dist/lemonade_darwin_386/ lemonade
tar zcvf pkg/lemonade_darwin_amd64.tar.gz -C dist/lemonade_darwin_amd64/ lemonade
clean:
rm -rf dist/
rm -f pkg/*.tar.gz pkg/*.zip