From 6b0e3a1dbf0291cc130b53416bd0764b146e6842 Mon Sep 17 00:00:00 2001 From: Andreas Neue Date: Wed, 20 Jan 2016 20:55:30 +0100 Subject: [PATCH] Makefile added. --- Makefile | 37 +++++++++++++++++++++++++++++++++++++ genversion.sh | 12 ++++++++++++ newsfeeds.conf | 11 +---------- 3 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 Makefile create mode 100755 genversion.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b0d5854 --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +GOPATH := ${PWD}:${GOPATH} +export GOPATH + +default: build + +build: test genversion + go build -v flokatirc + +build-win: test genversion + GOOS=windows GOARCH=amd64 go build -v -o ./build/bin/flokatirc.exe flokatirc + +genversion: + ./genversion.sh + +fmt: + go fmt ./... + +fix: + go fix ./... + +imports: + find . -type f -name "*.go" -exec goimports -w {} \; + +doc: + godoc -http=:6060 -index + +test: + go test ./... + +commit: + git commit -a -F changes.log + rm changes.log + touch changes.log + ./genversion.sh + +push: + git push diff --git a/genversion.sh b/genversion.sh new file mode 100755 index 0000000..3f24f88 --- /dev/null +++ b/genversion.sh @@ -0,0 +1,12 @@ +#!/bin/sh +VERSIONGO="version/version.go" +echo "package version" >$VERSIONGO +echo "" >>$VERSIONGO +echo "const (" >>$VERSIONGO +echo -n " FlokatiVersion = \"" >>$VERSIONGO +echo -n `git rev-parse --abbrev-ref HEAD` >>$VERSIONGO +echo "\"" >>$VERSIONGO +echo -n " FlokatiBuild = \"" >>$VERSIONGO +echo -n `git rev-list HEAD --count` >>$VERSIONGO +echo "\"" >>$VERSIONGO +echo ")" >>$VERSIONGO diff --git a/newsfeeds.conf b/newsfeeds.conf index f247709..68de158 100644 --- a/newsfeeds.conf +++ b/newsfeeds.conf @@ -1,10 +1 @@ -https://robertsspaceindustries.com/comm-link/rss -http://starcitizenbase.de/feed/ -https://www.youtube.com/feeds/videos.xml?channel_id=UCVlBNk1uHmMX93SvotZPfbQ -http://imperialnews.network/feed/ -http://www.pointofgaming.com/feed/ -http://il2sturmovik.com/news/feed/ -http://newsfeed.eveonline.com/en-US/44/articles/page/1/20 -https://www.shroudoftheavatar.com/?feed=rss2&cat=11 -https://www.shroudoftheavatar.com/?feed=rss2&cat=12 -http://camelotunchained.com/en/feed/ +https://example.com/rss