mirror of
https://github.com/coder/coder.git
synced 2026-06-05 22:18:20 +00:00
64fec8bf0b
Adds information like product/file version, description, product name and copyright to compiled Windows binaries in dogfood and release builds. Also adds an icon to the executable. This is necessary for Coder Desktop to be able to check the version on binaries. ### Before:   ### After:    Closes https://github.com/coder/coder/issues/16693
27 lines
686 B
Go
27 lines
686 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
_ "time/tzdata"
|
|
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
|
|
"github.com/coder/coder/v2/agent/agentexec"
|
|
_ "github.com/coder/coder/v2/buildinfo/resources"
|
|
entcli "github.com/coder/coder/v2/enterprise/cli"
|
|
)
|
|
|
|
func main() {
|
|
if len(os.Args) > 1 && os.Args[1] == "agent-exec" {
|
|
err := agentexec.CLI()
|
|
_, _ = fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
// This preserves backwards compatibility with an init function that is causing grief for
|
|
// web terminals using agent-exec + screen. See https://github.com/coder/coder/pull/15817
|
|
tea.InitTerminal()
|
|
var rootCmd entcli.RootCmd
|
|
rootCmd.RunWithSubcommands(rootCmd.EnterpriseSubcommands())
|
|
}
|