goreleaser

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package goreleaser provides a set of utilities to create and run containers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Name    string         `json:"name,omitempty"`
	Path    string         `json:"path,omitempty"`
	Goos    string         `json:"goos,omitempty"`
	Goarch  string         `json:"goarch,omitempty"`
	Goarm   string         `json:"goarm,omitempty"`
	Gomips  string         `json:"gomips,omitempty"`
	Goamd64 string         `json:"goamd64,omitempty"`
	Type    string         `json:"type,omitempty"`
	Extra   map[string]any `json:"extra,omitempty"`
}

Artifact is a goreleaser type defines a single artifact. Copied from https://github.com/goreleaser/goreleaser/blob/main/internal/artifact/artifact.go#L159

type Command

type Command string

Command a simple wrapper type for goreleaser commands to execute.

const (
	// CommandBuild is a custom type for `build` command.
	CommandBuild Command = "build"

	// CommandRelease is a custom type for `release` command.
	CommandRelease Command = "release"
)

type MetaRuntime

type MetaRuntime struct {
	Goos   string `json:"goos"`
	Goarch string `json:"goarch"`
}

MetaRuntime is a goreleaser type defines runtime info in metadata.json Copied from https://github.com/goreleaser/goreleaser/blob/main/internal/pipe/metadata/metadata.go#L72

type Metadata

type Metadata struct {
	ProjectName string      `json:"project_name"`
	Tag         string      `json:"tag"`
	PreviousTag string      `json:"previous_tag"`
	Version     string      `json:"version"`
	Commit      string      `json:"commit"`
	Date        time.Time   `json:"date"`
	Runtime     MetaRuntime `json:"runtime"`
}

Metadata is a goreleaser type defines metadata.json Copied from https://github.com/goreleaser/goreleaser/blob/main/internal/pipe/metadata/metadata.go#L62

type Result

type Result struct {
	Metadata  Metadata
	Artifacts []Artifact
}

Result represents is goreleaser combined output for metadata.json and artifacts.json.

func Run

func Run(cmd Command, debug bool, env map[string]string, args []string) (*Result, error)

Run executes goreleaser with given command and arguments and return results info about command.

Our goreleaser flow is contains docker image build and push and this is not possible to do with dagger at the moment. We will need to add this feature to dagger after https://github.com/dagger/dagger/issues/3712 released. Currently, we are using pure mage to execute goreleaser commands.

Directories

Path Synopsis
Package build provides a simple interface to the goreleaser build.
Package build provides a simple interface to the goreleaser build.
Package release provides a simple interface to the goreleaser release.
Package release provides a simple interface to the goreleaser release.

Jump to

Keyboard shortcuts

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