genbuilddate.sh, announce date in version info.

This commit is contained in:
Andreas Neue 2016-01-24 15:48:28 +01:00
parent 768e995926
commit 562d03bb7c
3 changed files with 15 additions and 3 deletions

View File

@ -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 ./...

9
genbuilddate.sh Executable file
View File

@ -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

View File

@ -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)
}