Skip to content

Commit

Permalink
Merge pull request #151 from grisu48/release
Browse files Browse the repository at this point in the history
Refactor VERSION and prepare 1.2.2 release
  • Loading branch information
grisu48 committed Jul 9, 2024
2 parents 1f52be9 + 591d9e8 commit 9f22917
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
7 changes: 3 additions & 4 deletions cmd/openqa-mon/openqa-mon.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ import (
"unicode"

"github.com/grisu48/gopenqa"
"github.com/grisu48/openqa-mon/internal"
)

const VERSION = "1.2.1"

var config Config
var tui TUI

Expand Down Expand Up @@ -529,7 +528,7 @@ func parseProgramArguments(cliargs []string) error {
printHelp()
os.Exit(0)
case "--version":
fmt.Println("openqa-mon version " + VERSION)
fmt.Println("openqa-mon version " + internal.VERSION)
os.Exit(0)
case "--jobs":
i++
Expand Down Expand Up @@ -736,7 +735,7 @@ func main() {
if len(remotes) == 1 {
remotesString = remotes[0].URI
}
tui.SetHeader(fmt.Sprintf("openqa-mon v%s - Monitoring %s", VERSION, remotesString))
tui.SetHeader(fmt.Sprintf("openqa-mon v%s - Monitoring %s", internal.VERSION, remotesString))
tui.Model.HideStates = config.HideStates
tui.Update()
defer tui.LeaveAltScreen()
Expand Down
5 changes: 2 additions & 3 deletions cmd/openqa-mq/openqa-mq.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import (
"strings"
"syscall"

"github.com/grisu48/openqa-mon/internal"
amqp "github.com/rabbitmq/amqp091-go"
)

const VERSION = "1.2.1"

type Config struct {
Remote string // Remote address
Keys []string // Keys or "topics"
Expand Down Expand Up @@ -86,7 +85,7 @@ func parseProgramArguments() error {
printUsage()
os.Exit(0)
} else if arg == "--version" {
fmt.Println("openqa-mq version " + VERSION)
fmt.Println("openqa-mq version " + internal.VERSION)
os.Exit(0)
} else if arg == "-r" {
if i >= len(args)-1 {
Expand Down
7 changes: 3 additions & 4 deletions cmd/openqa-revtui/openqa-revtui.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import (

"github.com/BurntSushi/toml"
"github.com/grisu48/gopenqa"
"github.com/grisu48/openqa-mon/internal"
)

const VERSION = "1.2.1"

/* Group is a single configurable monitoring unit. A group contains all parameters that will be queried from openQA */
type Group struct {
Name string
Expand Down Expand Up @@ -312,7 +311,7 @@ func parseProgramArgs() error {
printUsage()
os.Exit(0)
} else if arg == "--version" {
fmt.Println("openqa-revtui version " + VERSION)
fmt.Println("openqa-revtui version " + internal.VERSION)
os.Exit(0)
} else if arg == "-c" || arg == "--config" {
if i++; i >= n {
Expand Down Expand Up @@ -538,7 +537,7 @@ func browserJobs(jobs []gopenqa.Job) error {

// main routine for the TUI instance
func tui_main(tui *TUI, instance *gopenqa.Instance) error {
title := "openqa Review TUI Dashboard v" + VERSION
title := "openqa Review TUI Dashboard v" + internal.VERSION
var rabbitmq gopenqa.RabbitMQ
var err error

Expand Down
5 changes: 5 additions & 0 deletions internal/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// shared modules between the different openqa-mon applications
package internal

// VERSION gives the unified version string for all application
const VERSION = "1.2.2"

0 comments on commit 9f22917

Please sign in to comment.