Skip to content

Commit

Permalink
Changed static version information (Tool/DB) in Code to a dynamic app…
Browse files Browse the repository at this point in the history
…roach using the config.yaml.
  • Loading branch information
St4NNi committed Oct 1, 2021
1 parent 2a28612 commit f58d579
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ UpdateService:
Name: bakta
Port: "8081"
Testing: true
Version:
Tool: "1.1.1"
DB: "3.0.0"
ExpiryTime: 34560
JobContainer: "harbor.computational.bio.uni-giessen.de/bakta/bakta-web-job:0.1.0-beta.11"
InCluster: true
Expand Down
5 changes: 3 additions & 2 deletions endpoints/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"github.com/spf13/viper"
"log"
"os"
"time"
Expand Down Expand Up @@ -221,8 +222,8 @@ func (apiHandler *BaktaJobAPI) Version(ctx context.Context, request *api.Empty)
shaVersion := os.Getenv("GITHUB_SHA")

version := api.VersionResponse{
ToolVersion: "1.1.1",
DbVersion: "3.0.0",
ToolVersion: viper.GetString("Version.Tool"),
DbVersion: viper.GetString("Version.DB"),
BackendVersion: shaVersion,
}

Expand Down

0 comments on commit f58d579

Please sign in to comment.