build

package
v0.0.85-test Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package build contains the command / functions for the Grafana build process used when running the "build" target in the makefile

Index

Constants

View Source
const (
	GoOSWindows = "windows"
	GoOSLinux   = "linux"

	ServerBinary = "grafana-server"
	CLIBinary    = "grafana-cli"
)

Variables

This section is empty.

Functions

func LinuxPackageVersion

func LinuxPackageVersion(v string, buildID string) (string, string)

LinuxPackageVersion extracts the linux package version and iteration out of the version string. The version string is likely extracted from the package JSON.

func RunCmd

func RunCmd() int

RunCmd runs the build command and returns the exit code

Types

type BuildOpts

type BuildOpts struct {
	// contains filtered or unexported fields
}

BuildOpts are options provided to the build step

func BuildOptsFromFlags

func BuildOptsFromFlags() BuildOpts

BuildOptsFromFlags reads the cmd args to assemble a BuildOpts object. This function calls flag.Parse()

type PackageJSON

type PackageJSON struct {
	Version string `json:"version"`
}

func OpenPackageJSON

func OpenPackageJSON(dir string) (PackageJSON, error)

Opens the package.json file in the provided directory and returns a struct that represents its contents

Directories

Path Synopsis
wire module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL