update version
This commit is contained in:
parent
b9d7dd58bc
commit
366b878f20
194
bindata.go
194
bindata.go
File diff suppressed because one or more lines are too long
3
generate.go
Normal file
3
generate.go
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
//go:generate bash ./version.sh
|
1
go.mod
1
go.mod
@ -3,6 +3,7 @@ module git.siteop.biz/chtwrs/chirpnest
|
|||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect
|
||||||
github.com/go-sql-driver/mysql v1.5.0
|
github.com/go-sql-driver/mysql v1.5.0
|
||||||
github.com/jinzhu/copier v0.2.8
|
github.com/jinzhu/copier v0.2.8
|
||||||
github.com/robfig/cron/v3 v3.0.1
|
github.com/robfig/cron/v3 v3.0.1
|
||||||
|
2
go.sum
2
go.sum
@ -1,5 +1,7 @@
|
|||||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE=
|
||||||
|
github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo=
|
||||||
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
|
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
|
||||||
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||||
github.com/jinzhu/copier v0.2.8 h1:N8MbL5niMwE3P4dOwurJixz5rMkKfujmMRFmAanSzWE=
|
github.com/jinzhu/copier v0.2.8 h1:N8MbL5niMwE3P4dOwurJixz5rMkKfujmMRFmAanSzWE=
|
||||||
|
3
main.go
3
main.go
@ -23,9 +23,6 @@ import (
|
|||||||
var (
|
var (
|
||||||
config = flag.String("config", "./data/config.json", "config file path")
|
config = flag.String("config", "./data/config.json", "config file path")
|
||||||
initdb = flag.Bool("initdb", false, "initialize bot database")
|
initdb = flag.Bool("initdb", false, "initialize bot database")
|
||||||
githash string
|
|
||||||
buildstamp string
|
|
||||||
commits string
|
|
||||||
|
|
||||||
db *sql.DB
|
db *sql.DB
|
||||||
bot *tb.Bot
|
bot *tb.Bot
|
||||||
|
5
version.go
Normal file
5
version.go
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// Code generated by version.sh (@generated) DO NOT EDIT.
|
||||||
|
package main
|
||||||
|
var githash = "b9d7dd5"
|
||||||
|
var buildstamp = "2021-10-27_01:44:14"
|
||||||
|
var commits = "2551"
|
12
version.sh
Normal file
12
version.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Get the version.
|
||||||
|
githash=`git rev-parse --short HEAD`
|
||||||
|
buildstamp=`date -u '+%Y-%m-%d_%H:%M:%S'`
|
||||||
|
commits=`git rev-list --count master`
|
||||||
|
# Write out the package.
|
||||||
|
cat << EOF > version.go
|
||||||
|
// Code generated by version.sh (@generated) DO NOT EDIT.
|
||||||
|
package main
|
||||||
|
var githash = "$githash"
|
||||||
|
var buildstamp = "$buildstamp"
|
||||||
|
var commits = "$commits"
|
||||||
|
EOF
|
Loading…
Reference in New Issue
Block a user