-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
21 lines (17 loc) · 979 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package = github.com/jbarone/ghostToHugo
.PHONY: release
release: package
rm -rf dist
package: build
mkdir -p release
tar -cvzf release/ghostToHugo-Darwin-x86_64.tar.gz --directory=dist/darwin/amd64 .
tar -cvzf release/ghostToHugo-Linux-x86_64.tar.gz --directory=dist/linux/amd64 .
zip -j release/ghostToHugo-Windows-x86_64 dist/windows/amd64/*
tar -cvzf release/ghostToHugo-Linux-i386.tar.gz --directory=dist/linux/386 .
zip -j release/ghostToHugo-Windows-i386 dist/windows/386/*
build:
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o dist/darwin/amd64/ghostToHugo $(package)
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o dist/linux/amd64/ghostToHugo $(package)
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o dist/windows/amd64/ghostToHugo.exe $(package)
GOOS=linux GOARCH=386 go build -ldflags="-s -w" -o dist/linux/386/ghostToHugo $(package)
GOOS=windows GOARCH=386 go build -ldflags="-s -w" -o dist/windows/386/ghostToHugo.exe $(package)