Compare commits

..

No commits in common. "87344dd6013cb5a66646eea9e83a3608e1323bd0" and "e5836a8b97f6d835a6d74a0bee5745bf5e861a7c" have entirely different histories.

3 changed files with 7 additions and 33 deletions

View File

@ -1,9 +1,6 @@
package depenv package depenv
import ( import "os"
"fmt"
"os"
)
var manageServers = map[DeploymentEnvironment]string{ var manageServers = map[DeploymentEnvironment]string{
DeployDevel: "https://manage.askdev.grundclock.com", DeployDevel: "https://manage.askdev.grundclock.com",
@ -68,16 +65,3 @@ func (d DeploymentEnvironment) APIHost() string {
func (d DeploymentEnvironment) ManageURL(path string) string { func (d DeploymentEnvironment) ManageURL(path string) string {
return manageServers[d] + path 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
}

View File

@ -2,7 +2,7 @@
set -euo pipefail 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 if [ ! -z "${harbor_username:-}" ]; then
DOCKER_FILE=~/.docker/config.json DOCKER_FILE=~/.docker/config.json

View File

@ -13,12 +13,10 @@ import (
) )
// VERSION has the current software version (set in the build process) // VERSION has the current software version (set in the build process)
var ( var VERSION string
VERSION string var buildTime string
buildTime string var gitVersion string
gitVersion string var gitModified bool
gitModified bool
)
var info Info var info Info
@ -30,6 +28,7 @@ type Info struct {
} }
func init() { func init() {
info.BuildTime = buildTime info.BuildTime = buildTime
info.GitRev = gitVersion info.GitRev = gitVersion
@ -91,15 +90,6 @@ func VersionCmd(name string) *cobra.Command {
return versionCmd 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) { func RegisterMetric(name string, registry prometheus.Registerer) {
if len(name) > 0 { if len(name) > 0 {
name = strings.ReplaceAll(name, "-", "_") name = strings.ReplaceAll(name, "-", "_")