dist
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package dist is a release artifact builder library.
Index¶
- type Build
- func (b *Build) AddOnCloseFunc(f func() error)
- func (b *Build) Build(targets []Target) (files []string, err error)
- func (b *Build) BuildGoBinary(path string, env map[string]string) (string, error)
- func (b *Build) BuildGoBinaryWithTags(path string, env map[string]string, tags []string) (string, error)
- func (b *Build) BuildWebClientAssets() error
- func (b *Build) Close() error
- func (b *Build) Command(dir, cmd string, args ...string) *Command
- func (b *Build) Extra(key any, constructor func() any) any
- func (b *Build) GoPkg(pkg string) (string, error)
- func (b *Build) Once(name string, fn func() error) error
- func (b *Build) TmpDir() string
- type Command
- type Memoize
- type MemoizedFn
- type Signer
- type Target
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeBuild¶
type Build struct {// Repo is a path to the root Go module for the build.Repostring// Out is where build artifacts are written.Outstring// Verbose is whether to print all command output, rather than just failed// commands.Verbosebool// WebClientSource is a path to the source for the web client.// If non-empty, web client assets will be built.WebClientSourcestring// Tmp is a temporary directory that gets deleted when the Builder is closed.Tmpstring// Go is the path to the Go binary to use for building.Gostring// Yarn is the path to the yarn binary to use for building the web client assets.Yarnstring// Version is the version info of the build.Versionmkversion.VersionInfo// Time is the timestamp of the build.Timetime.Time// contains filtered or unexported fields}A Build is a build context for Targets.
func (*Build)AddOnCloseFunc¶added inv1.66.0
func (*Build)BuildGoBinary¶
BuildGoBinary builds the Go binary at path and returns the path to thebinary. Builds are cached by path and env, so each build only happens onceper process execution.
func (*Build)BuildGoBinaryWithTags¶added inv1.46.0
func (b *Build) BuildGoBinaryWithTags(pathstring, env map[string]string, tags []string) (string,error)
BuildGoBinaryWithTags builds the Go binary at path and returns thepath to the binary. Builds are cached by path, env and tags, soeach build only happens once per process execution.
The passed in tags override gocross's automatic selection of buildtags, so you will have to figure out and specify all the tagsrelevant to your build.
func (*Build)BuildWebClientAssets¶added inv1.50.0
BuildWebClientAssets builds the JS and CSS assets used by the web client.If b.WebClientSource is non-empty, assets are built in a "build" sub-directory of that path.Otherwise, no assets are built.
func (*Build)GoPkg¶
GoPkg returns the path on disk of pkg.The module of pkg must be imported in b.Repo's go.mod.
typeCommand¶
Command runs an exec.Cmd and returns its exit status. If the command fails,its output is printed to os.Stdout, otherwise it's suppressed.
func (*Command)CombinedOutput¶
CombinedOutput is like c.Cmd.CombinedOutput, but returns the output as astring instead of a byte slice.
typeMemoize¶
type Memoize[Oany] struct {// contains filtered or unexported fields}
Memoize runs MemoizedFns and remembers their results.
typeMemoizedFn¶
MemoizedFn is a function that memoize.Do can call.
Directories¶
| Path | Synopsis |
|---|---|
Package cli provides the skeleton of a CLI for building release packages. | Package cli provides the skeleton of a CLI for building release packages. |
Package qnap contains dist Targets for building QNAP Tailscale packages. | Package qnap contains dist Targets for building QNAP Tailscale packages. |
Package synology contains dist Targets for building Synology Tailscale packages. | Package synology contains dist Targets for building Synology Tailscale packages. |
Package unixpkgs contains dist Targets for building unix Tailscale packages. | Package unixpkgs contains dist Targets for building unix Tailscale packages. |