Skip to content

Commit

Permalink
Improve version handling
Browse files Browse the repository at this point in the history
  • Loading branch information
blaubaer committed Aug 26, 2024
1 parent fff5881 commit 9dbc2f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ jobs:
with:
retention-days: 1
name: dist
path: dist
path: var/dist
9 changes: 6 additions & 3 deletions cmd/bifroest/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ package main

import (
"context"
"github.com/alecthomas/kingpin"
log "github.com/echocat/slf4g"
"github.com/engity-com/bifroest/pkg/service"
"os"
"os/signal"
"syscall"

"github.com/alecthomas/kingpin"
log "github.com/echocat/slf4g"

"github.com/engity-com/bifroest/pkg/service"
)

var _ = registerCommand(func(app *kingpin.Application) {
Expand All @@ -25,6 +27,7 @@ var _ = registerCommand(func(app *kingpin.Application) {
func doRun() error {
svc := service.Service{
Configuration: *configurationRef.Get(),
Version: versionV,
}

fail := func(err error) error {
Expand Down
3 changes: 2 additions & 1 deletion pkg/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var (

type Service struct {
Configuration configuration.Configuration
Version common.Version

Logger log.Logger
}
Expand Down Expand Up @@ -269,7 +270,7 @@ func (this *service) isRelevantError(err error) bool {

func (this *service) createNewServerConfig(ssh.Context) *gssh.ServerConfig {
return &gssh.ServerConfig{
ServerVersion: "SSH-2.0-Engity-Bifroest_0.1.0",
ServerVersion: "SSH-2.0-Engity-Bifroest_" + this.Version.Version(),
MaxAuthTries: int(this.Configuration.Ssh.MaxAuthTries),
}
}
Expand Down

0 comments on commit 9dbc2f2

Please sign in to comment.