Get version for build-universal from the build-helper output, use package.json for all versioning (#321)

* store version for build in txt file

* get version from version.txt

* remove quotes

* Use version.js for Go version too

* test

* test

* simplify things more

* rename zips to consistent waveterm name

* remove newline

* always use v

* always use Wave rather than waveterm
This commit is contained in:
Evan Simkowitz
2024-02-23 17:44:00 -08:00
committed by GitHub
parent 7e21b80af0
commit f85067998f
7 changed files with 26 additions and 12 deletions
+5 -1
View File
@@ -66,10 +66,13 @@ const TelemetryInterval = 8 * time.Hour
const MaxWriteFileMemSize = 20 * (1024 * 1024) // 20M
// these are set at build time
var WaveVersion = "v0.0.0"
var BuildTime = "0"
var GlobalLock = &sync.Mutex{}
var WSStateMap = make(map[string]*scws.WSState) // clientid -> WsState
var GlobalAuthKey string
var BuildTime = "0"
var shutdownOnce sync.Once
var ContentTypeHeaderValidRe = regexp.MustCompile(`^\w+/[\w.+-]+$`)
@@ -804,6 +807,7 @@ func doShutdown(reason string) {
func main() {
scbase.BuildTime = BuildTime
scbase.WaveVersion = WaveVersion
base.ProcessType = base.ProcessType_WaveSrv
wlog.GlobalSubsystem = base.ProcessType_WaveSrv
wlog.LogConsumer = wlog.LogWithLogger
+3 -1
View File
@@ -35,14 +35,16 @@ const WaveLockFile = "waveterm.lock"
const WaveDirName = ".waveterm" // must match emain.ts
const WaveDevDirName = ".waveterm-dev" // must match emain.ts
const WaveAppPathVarName = "WAVETERM_APP_PATH"
const WaveVersion = "v0.6.1"
const WaveAuthKeyFileName = "waveterm.authkey"
const MShellVersion = "v0.4.0"
var SessionDirCache = make(map[string]string)
var ScreenDirCache = make(map[string]string)
var BaseLock = &sync.Mutex{}
// these are set by the main-server using build-time variables
var BuildTime = "-"
var WaveVersion = "-"
func IsDevMode() bool {
pdev := os.Getenv(WaveDevVarName)