-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
29 lines (23 loc) · 1.01 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
VERSION = $(shell git tag --contains)
default:
go fmt
go build -ldflags "-X main.version=$(VERSION)"
rel:
go fmt
mkdir rel/
CGO_ENABLED=0 GOOS=linux go build -ldflags "-X main.version=$(VERSION)" -o ipfs-sync
upx ipfs-sync
tar -caf ipfs-sync-linux64.tar.xz ipfs-sync LICENSE README.md systemd config.yaml.sample
mv ipfs-sync-linux64.tar.xz rel/
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags "-X main.version=$(VERSION)" -o ipfs-sync
upx ipfs-sync
tar -caf ipfs-sync-linuxARM.tar.xz ipfs-sync LICENSE README.md systemd config.yaml.sample
mv ipfs-sync-linuxARM.tar.xz rel/
CGO_ENABLED=0 GOOS=darwin go build -ldflags "-X main.version=$(VERSION)" -o ipfs-sync
upx ipfs-sync
tar -caf ipfs-sync-darwin64.tar.gz ipfs-sync LICENSE README.md config.yaml.sample
mv ipfs-sync-darwin64.tar.gz rel/
CGO_ENABLED=0 GOOS=windows go build -ldflags "-X main.version=$(VERSION)" -o ipfs-sync.exe
upx ipfs-sync.exe
zip ipfs-sync-win64.zip ipfs-sync.exe LICENSE README.md config.yaml.sample
mv ipfs-sync-win64.zip rel/