mmflokati/Makefile

54 lines
931 B
Makefile
Raw Normal View History

2017-06-28 10:23:37 +00:00
GOPATH := ${PWD}:${GOPATH}
export GOPATH
2018-04-01 08:50:18 +00:00
VERSONGO = version.go
2017-06-28 10:23:37 +00:00
default: build
2018-04-01 08:50:18 +00:00
build: genversion test
2017-06-28 10:23:37 +00:00
go build -v mmflokati
build-win: test genversion
GOOS=windows GOARCH=amd64 go build -v -o mmflokati.exe mmflokati
genversion:
2018-04-01 08:50:18 +00:00
echo "package main" > version.go
echo "" >>version.go
echo "const (" >>version.go
echo -n " FlokatiVersion = \"" >>version.go
echo -n "" >>version.go
echo "\"" >>version.go
echo -n " FlokatiBuild = \"" >>version.go
echo -n "" >>version.go
echo "\"" >>version.go
echo -n " FlokatiBuilddate = \"" >>version.go
echo -n "" >>version.go
echo "\"" >>version.go
echo ")" >>version.go
2017-06-28 10:23:37 +00:00
2017-07-01 22:50:47 +00:00
docker: build
./dockerbuild.sh
2017-06-28 10:23:37 +00:00
fmt:
go fmt ./...
fix:
go fix ./...
imports:
find . -type f -name "*.go" -exec goimports -w {} \;
doc:
godoc -http=:6060 -index
test:
go test ./...
2018-04-01 08:50:18 +00:00
commit: genversion
2017-06-28 10:23:37 +00:00
git commit -a -F changes.log
rm changes.log
touch changes.log
push:
git push