Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Exposes version #218

Merged
merged 3 commits into from
Jul 25, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
wire project and add version
  • Loading branch information
TheoBrigitte committed Jul 25, 2019
commit 4c124b124a643245022c08369dd1d777648faba7
27 changes: 13 additions & 14 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ import (
"github.com/spf13/viper"

"github.com/giantswarm/cert-operator/flag"
"github.com/giantswarm/cert-operator/pkg/project"
"github.com/giantswarm/cert-operator/server"
"github.com/giantswarm/cert-operator/service"
)

var (
description string = "The cert-operator handles certificates for Kubernetes clusters running on Giantnetes."
f *flag.Flag = flag.New()
gitCommit string = "n/a"
name string = "cert-operator"
source string = "https://github.com/giantswarm/cert-operator"
f *flag.Flag = flag.New()
)

func main() {
Expand All @@ -44,10 +41,11 @@ func main() {
Logger: newLogger,
Viper: v,

Description: description,
GitCommit: gitCommit,
ProjectName: name,
Source: source,
Description: project.Description(),
GitCommit: project.GitSHA(),
ProjectName: project.Name(),
Source: project.Source(),
Version: project.Version(),
}

newService, err = service.New(serviceConfig)
Expand All @@ -65,7 +63,7 @@ func main() {
Service: newService,
Viper: v,

ProjectName: name,
ProjectName: project.Name(),
}

newServer, err = server.New(c)
Expand All @@ -84,10 +82,11 @@ func main() {
Logger: newLogger,
ServerFactory: newServerFactory,

Description: description,
GitCommit: gitCommit,
Name: name,
Source: source,
Description: project.Description(),
GitCommit: project.GitSHA(),
Name: project.Name(),
Source: project.Source(),
Version: project.Version(),
VersionBundles: service.NewVersionBundles(),
}

Expand Down
2 changes: 2 additions & 0 deletions service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type Config struct {
GitCommit string
ProjectName string
Source string
Version string
}

type Service struct {
Expand Down Expand Up @@ -147,6 +148,7 @@ func New(config Config) (*Service, error) {
GitCommit: config.GitCommit,
Name: config.ProjectName,
Source: config.Source,
Version: config.Version,
VersionBundles: NewVersionBundles(),
}

Expand Down