Compare commits
No commits in common. "87344dd6013cb5a66646eea9e83a3608e1323bd0" and "e5836a8b97f6d835a6d74a0bee5745bf5e861a7c" have entirely different histories.
87344dd601
...
e5836a8b97
@ -1,9 +1,6 @@
|
||||
package depenv
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
import "os"
|
||||
|
||||
var manageServers = map[DeploymentEnvironment]string{
|
||||
DeployDevel: "https://manage.askdev.grundclock.com",
|
||||
@ -68,16 +65,3 @@ func (d DeploymentEnvironment) APIHost() string {
|
||||
func (d DeploymentEnvironment) ManageURL(path string) string {
|
||||
return manageServers[d] + path
|
||||
}
|
||||
|
||||
func (d *DeploymentEnvironment) UnmarshalText(text []byte) error {
|
||||
s := string(text)
|
||||
if s == "" {
|
||||
return nil
|
||||
}
|
||||
env := DeploymentEnvironmentFromString(s)
|
||||
if env == DeployUndefined {
|
||||
return fmt.Errorf("invalid deployment environment: %s", s)
|
||||
}
|
||||
*d = env
|
||||
return nil
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
go install github.com/goreleaser/goreleaser/v2@v2.8.2
|
||||
go install github.com/goreleaser/goreleaser/v2@v2.5.1
|
||||
|
||||
if [ ! -z "${harbor_username:-}" ]; then
|
||||
DOCKER_FILE=~/.docker/config.json
|
||||
|
@ -13,12 +13,10 @@ import (
|
||||
)
|
||||
|
||||
// VERSION has the current software version (set in the build process)
|
||||
var (
|
||||
VERSION string
|
||||
buildTime string
|
||||
gitVersion string
|
||||
gitModified bool
|
||||
)
|
||||
var VERSION string
|
||||
var buildTime string
|
||||
var gitVersion string
|
||||
var gitModified bool
|
||||
|
||||
var info Info
|
||||
|
||||
@ -30,6 +28,7 @@ type Info struct {
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
info.BuildTime = buildTime
|
||||
info.GitRev = gitVersion
|
||||
|
||||
@ -91,15 +90,6 @@ func VersionCmd(name string) *cobra.Command {
|
||||
return versionCmd
|
||||
}
|
||||
|
||||
type KongVersionCmd struct {
|
||||
Name string `kong:"-"`
|
||||
}
|
||||
|
||||
func (cmd *KongVersionCmd) Run() error {
|
||||
fmt.Printf("%s %s\n", cmd.Name, Version())
|
||||
return nil
|
||||
}
|
||||
|
||||
func RegisterMetric(name string, registry prometheus.Registerer) {
|
||||
if len(name) > 0 {
|
||||
name = strings.ReplaceAll(name, "-", "_")
|
||||
|
Loading…
x
Reference in New Issue
Block a user