use env vars for versions
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
92da6ff177
commit
21c79d03ec
|
@ -152,6 +152,7 @@ func globalDisplayOptions(box *gui.Node) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Info("redo go.sum finished ok!")
|
log.Info("redo go.sum finished ok!")
|
||||||
|
longB.Disable()
|
||||||
me.Enable()
|
me.Enable()
|
||||||
longB.Enable()
|
longB.Enable()
|
||||||
})
|
})
|
||||||
|
|
28
main.go
28
main.go
|
@ -3,17 +3,20 @@ package main
|
||||||
import (
|
import (
|
||||||
"embed"
|
"embed"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"go.wit.com/gui"
|
"go.wit.com/gui"
|
||||||
|
"go.wit.com/lib/gui/shell"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: autocompute these in the gui
|
// TODO: autocompute these in the gui
|
||||||
var releaseReasonS string = "deb packager"
|
var releaseReasonS string
|
||||||
var releaseVersion string = "0.20.3"
|
var releaseVersion string
|
||||||
var widgetVersion string = "1.1.18"
|
var widgetVersion string
|
||||||
|
|
||||||
//go:embed resources/*
|
//go:embed resources/*
|
||||||
var resToolkit embed.FS
|
var resToolkit embed.FS
|
||||||
|
@ -22,6 +25,16 @@ func main() {
|
||||||
me = new(autoType)
|
me = new(autoType)
|
||||||
me.allrepos = make(map[string]*repo)
|
me.allrepos = make(map[string]*repo)
|
||||||
|
|
||||||
|
// TODO: autocompute these in the gui
|
||||||
|
releaseReasonS = os.Getenv("GUIRELEASE_REASON")
|
||||||
|
releaseVersion = os.Getenv("GUIRELEASE_VERSION")
|
||||||
|
widgetVersion = os.Getenv("GUIRELEASE_WIDGET")
|
||||||
|
|
||||||
|
if releaseVersion == "" {
|
||||||
|
log.Info("GUIRELEASE_VERSION not set")
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
me.myGui = gui.New()
|
me.myGui = gui.New()
|
||||||
me.myGui.InitEmbed(resToolkit)
|
me.myGui.InitEmbed(resToolkit)
|
||||||
me.myGui.Default()
|
me.myGui.Default()
|
||||||
|
@ -31,6 +44,15 @@ func main() {
|
||||||
|
|
||||||
globalDisplayOptions(me.mainBox)
|
globalDisplayOptions(me.mainBox)
|
||||||
|
|
||||||
|
// if you have a go.work file, you must delete it
|
||||||
|
// TODO: check for go.work files anywhere
|
||||||
|
homeDir, _ := os.UserHomeDir()
|
||||||
|
gowork := filepath.Join(homeDir, "go/src/go.work")
|
||||||
|
if shell.Exists(gowork) {
|
||||||
|
log.Info("go.work must be deleted")
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
repoworld()
|
repoworld()
|
||||||
|
|
||||||
me.releaseReasonS = releaseReasonS
|
me.releaseReasonS = releaseReasonS
|
||||||
|
|
Loading…
Reference in New Issue