mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Server: Switch from separate server & cli to a unified grafana binary (#58286)
* avoid the need for a second bulky binary for grafana-cli * look for grafana-server in $PATH as well as same directory * implement unified "grafana" command * update dockerfiles, fix grafana-cli -v * update packaging to work with single binary - add wrapper scripts for grafana and grafana-server - update and sync package files - implement --sign flag of build package command - stop packaging scripts folder, they are not useful for end users - add support for --configOverrides in server command - remove unused nfpm.yaml config file * windows support
This commit is contained in:
@@ -17,11 +17,12 @@ const (
|
||||
GoOSWindows = "windows"
|
||||
GoOSLinux = "linux"
|
||||
|
||||
ServerBinary = "grafana-server"
|
||||
CLIBinary = "grafana-cli"
|
||||
BackendBinary = "grafana"
|
||||
ServerBinary = "grafana-server"
|
||||
CLIBinary = "grafana-cli"
|
||||
)
|
||||
|
||||
var binaries = []string{ServerBinary, CLIBinary}
|
||||
var binaries = []string{BackendBinary, ServerBinary, CLIBinary}
|
||||
|
||||
func logError(message string, err error) int {
|
||||
log.Println(message, err)
|
||||
@@ -64,6 +65,16 @@ func RunCmd() int {
|
||||
case "setup":
|
||||
setup(opts.goos)
|
||||
|
||||
case "build-backend":
|
||||
if !opts.isDev {
|
||||
clean(opts)
|
||||
}
|
||||
|
||||
if err := doBuild("grafana", "./pkg/cmd/grafana", opts); err != nil {
|
||||
log.Println(err)
|
||||
return 1
|
||||
}
|
||||
|
||||
case "build-srv", "build-server":
|
||||
if !opts.isDev {
|
||||
clean(opts)
|
||||
|
||||
Reference in New Issue
Block a user