genbuilddate.sh, announce date in version info.
This commit is contained in:
parent
768e995926
commit
562d03bb7c
7
Makefile
7
Makefile
|
@ -3,15 +3,18 @@ export GOPATH
|
||||||
|
|
||||||
default: build
|
default: build
|
||||||
|
|
||||||
build: test genversion
|
build: test genversion genbuilddate
|
||||||
go build -v flokatirc
|
go build -v flokatirc
|
||||||
|
|
||||||
build-win: test genversion
|
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:
|
||||||
./genversion.sh
|
./genversion.sh
|
||||||
|
|
||||||
|
genbuilddate:
|
||||||
|
./genbuilddate.sh
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
go fmt ./...
|
go fmt ./...
|
||||||
|
|
||||||
|
|
|
@ -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
|
2
main.go
2
main.go
|
@ -165,5 +165,5 @@ func HandleMessage(m *irc.Message) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func SoftwareInfo() string {
|
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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue