mirror of
https://github.com/alice-lg/birdwatcher.git
synced 2025-03-09 00:00:05 +01:00
version bump: get actual birdwatcher version in request
This commit is contained in:
parent
a2c829c34a
commit
87252032bf
3 changed files with 9 additions and 2 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.7.4
|
||||
1.7.5
|
||||
|
|
|
@ -12,6 +12,9 @@ import (
|
|||
"github.com/julienschmidt/httprouter"
|
||||
)
|
||||
|
||||
//go:generate versionize
|
||||
var VERSION = "1.7.5"
|
||||
|
||||
func isModuleEnabled(module string, modulesEnabled []string) bool {
|
||||
for _, enabled := range modulesEnabled {
|
||||
if enabled == module {
|
||||
|
@ -93,6 +96,7 @@ func main() {
|
|||
bird6 := flag.Bool("6", false, "Use bird6 instead of bird")
|
||||
flag.Parse()
|
||||
|
||||
endpoints.VERSION = VERSION
|
||||
bird.InstallRateLimitReset()
|
||||
// Load configurations
|
||||
conf, err := LoadConfigs([]string{
|
||||
|
|
|
@ -17,10 +17,13 @@ type APIInfo struct {
|
|||
CacheStatus CacheStatus `json:"cache_status"`
|
||||
}
|
||||
|
||||
// go generate does not work in subdirectories. Beautious.
|
||||
var VERSION string
|
||||
|
||||
func GetApiInfo(from_cache bool) *APIInfo {
|
||||
ai := &APIInfo{}
|
||||
|
||||
ai.Version = "1.0"
|
||||
ai.Version = VERSION
|
||||
ai.ResultFromCache = from_cache
|
||||
|
||||
return ai
|
||||
|
|
Loading…
Add table
Reference in a new issue