diff --git a/Makefile b/Makefile index b0d5854..4924d7c 100644 --- a/Makefile +++ b/Makefile @@ -3,15 +3,18 @@ export GOPATH default: build -build: test genversion +build: test genversion genbuilddate go build -v flokatirc build-win: test genversion - GOOS=windows GOARCH=amd64 go build -v -o ./build/bin/flokatirc.exe flokatirc + GOOS=windows GOARCH=amd64 go build -v -o flokatirc.exe flokatirc genversion: ./genversion.sh +genbuilddate: + ./genbuilddate.sh + fmt: go fmt ./... diff --git a/genbuilddate.sh b/genbuilddate.sh new file mode 100755 index 0000000..0100a4e --- /dev/null +++ b/genbuilddate.sh @@ -0,0 +1,9 @@ +#!/bin/sh +BUILDDATEGO="version/builddate.go" +echo "package version" >$BUILDDATEGO +echo "" >>$BUILDDATEGO +echo "const (" >>$BUILDDATEGO +echo -n " FlokatiBuilddate = \"" >>$BUILDDATEGO +echo -n `date` >>$BUILDDATEGO +echo "\"" >>$BUILDDATEGO +echo ")" >>$BUILDDATEGO diff --git a/main.go b/main.go index 299937f..8a299fe 100644 --- a/main.go +++ b/main.go @@ -165,5 +165,5 @@ func HandleMessage(m *irc.Message) { } func SoftwareInfo() string { - return fmt.Sprintf("flokatirc %s-%s", version.FlokatiVersion, version.FlokatiBuild) + return fmt.Sprintf("flokatirc %s-%s (built %s)", version.FlokatiVersion, version.FlokatiBuild, version.FlokatiBuilddate) }