forge/windowPublish.go

42 lines
878 B
Go

// Copyright 2017-2025 WIT.COM Inc. All rights reserved.
// Use of this source code is governed by the GPL 3.0
package main
// An app to submit patches for the 30 GO GUI repos
import (
"go.wit.com/lib/gadgets"
"go.wit.com/log"
)
// Publish Window
func makePublishWindow() *gadgets.GenericWindow {
pubWin := gadgets.NewGenericWindow("publish code", "tasks for merging, versioning and publishing code")
grid := pubWin.Group.RawGrid()
grid.NewButton("merge all patches to master", func() {
pubWin.Disable()
defer pubWin.Enable()
if err := doAllCheckoutDevel(); err != nil {
log.Info("checkout error:", err)
} else {
log.Info("checkout was ok")
}
mergeUserToDevel(true)
if err := doAllCheckoutMaster(); err != nil {
log.Info("checkout error:", err)
} else {
log.Info("checkout was ok")
}
mergeDevelToMaster(true)
})
return pubWin
}