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!")
|
||||
longB.Disable()
|
||||
me.Enable()
|
||||
longB.Enable()
|
||||
})
|
||||
|
|
28
main.go
28
main.go
|
@ -3,17 +3,20 @@ package main
|
|||
import (
|
||||
"embed"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"go.wit.com/gui"
|
||||
"go.wit.com/lib/gui/shell"
|
||||
"go.wit.com/log"
|
||||
)
|
||||
|
||||
// TODO: autocompute these in the gui
|
||||
var releaseReasonS string = "deb packager"
|
||||
var releaseVersion string = "0.20.3"
|
||||
var widgetVersion string = "1.1.18"
|
||||
var releaseReasonS string
|
||||
var releaseVersion string
|
||||
var widgetVersion string
|
||||
|
||||
//go:embed resources/*
|
||||
var resToolkit embed.FS
|
||||
|
@ -22,6 +25,16 @@ func main() {
|
|||
me = new(autoType)
|
||||
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.InitEmbed(resToolkit)
|
||||
me.myGui.Default()
|
||||
|
@ -31,6 +44,15 @@ func main() {
|
|||
|
||||
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()
|
||||
|
||||
me.releaseReasonS = releaseReasonS
|
||||
|
|
Loading…
Reference in New Issue