add version file

This commit is contained in:
wy65701436 2017-03-21 18:39:09 -07:00
parent 5baf565c00
commit e667bd7a79
2 changed files with 3 additions and 2 deletions

1
VERSION Normal file
View File

@ -0,0 +1 @@
dev

View File

@ -116,7 +116,7 @@ func (sia *SystemInfoAPI) GetGeneralInfo() {
registryURL = l[0]
}
_, caStatErr := os.Stat(defaultRootCert)
harbor_version := sia.getVersion()
harborVersion := sia.getVersion()
info := GeneralInfo{
AdmiralEndpoint: cfg[common.AdmiralEndpoint].(string),
WithAdmiral: config.WithAdmiral(),
@ -126,7 +126,7 @@ func (sia *SystemInfoAPI) GetGeneralInfo() {
SelfRegistration: cfg[common.SelfRegistration].(bool),
RegistryURL: registryURL,
HasCARoot: caStatErr == nil,
HarborVersion: harbor_version,
HarborVersion: harborVersion,
}
sia.Data["json"] = info
sia.ServeJSON()