Dagger
Search

goreleaser

No long description provided.

Installation

dagger install github.com/developer-guy/excoriate-daggerverse/goreleaser@b4bc20faec104b7f45c9a429b20f7d39d1531b79

Entrypoint

Return Type
Goreleaser !
Arguments
NameTypeDefault ValueDescription
versionString "latest"version is the version of the GoReleaser to use, e.g., "v1.22.0".
imageString "goreleaser/goreleaser"image is the image to use as the base container.
ctrContainer -Ctrl is the container to use as a base container.
envVarsFromHostString -envVarsFromHost is a list of environment variables to pass from the host to the container. Later on, in order to pass it to the container, it's going to be converted into a map.
Example
func (m *myModule) example() *Goreleaser  {
	return dag.
			Goreleaser()
}

Types

Goreleaser šŸ”—

src() šŸ”—

Src is the directory that contains all the source code, including the module directory.

Return Type
Directory !
Example
func (m *myModule) example() *Directory  {
	return dag.
			Goreleaser().
			Src()
}

ctr() šŸ”—

Ctr is the container to use as a base container.

Return Type
Container !
Example
func (m *myModule) example() *Container  {
	return dag.
			Goreleaser().
			Ctr()
}

cfgFile() šŸ”—

CfgFile is the configuration file to use.

Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Goreleaser().
			CfgFile(ctx)
}

withGoCache() šŸ”—

WithGoCache mounts the Go cache directories. The Go cache directories are: - /go/pkg/mod - /root/.cache/go-build

Return Type
Goreleaser !
Example
func (m *myModule) example() *Goreleaser  {
	return dag.
			Goreleaser().
			WithGoCache()
}

withSource() šŸ”—

WithSource sets the source directory.

Return Type
Goreleaser !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
Example
func (m *myModule) example(src *Directory) *Goreleaser  {
	return dag.
			Goreleaser().
			WithSource(src)
}

withCfgFile() šŸ”—

WithCfgFile sets the configuration file to use. The default configuration file is ā€œ.goreleaser.yamlā€.

Return Type
Goreleaser !
Arguments
NameTypeDefault ValueDescription
cfgFileString -cfgFile is the configuration file to use.
Example
func (m *myModule) example() *Goreleaser  {
	return dag.
			Goreleaser().
			WithCfgFile()
}

withCmd() šŸ”—

WithCMD sets the command to run.

Return Type
Goreleaser !
Arguments
NameTypeDefault ValueDescription
cmd[String ! ] !-No description provided
Example
func (m *myModule) example(cmd []string) *Goreleaser  {
	return dag.
			Goreleaser().
			WithCmd(cmd)
}

withEnvVar() šŸ”—

WithEnvVar sets an environment variable.

Return Type
Goreleaser !
Arguments
NameTypeDefault ValueDescription
keyString !-No description provided
valueString !-No description provided
expandBoolean !-No description provided
Example
func (m *myModule) example(key string, value string, expand bool) *Goreleaser  {
	return dag.
			Goreleaser().
			WithEnvVar(key, value, expand)
}

base() šŸ”—

Base sets the base image and version, and creates the base container. The default image is ā€œgoreleaser/goreleaserā€ and the default version is ā€œlatestā€.

Return Type
Goreleaser !
Arguments
NameTypeDefault ValueDescription
imageUrlString !-No description provided
Example
func (m *myModule) example(imageUrl string) *Goreleaser  {
	return dag.
			Goreleaser().
			Base(imageUrl)
}

version() šŸ”—

Version runs the ā€˜goreleaser ā€“versionā€™ command. Itā€™s equivalent to running ā€˜goreleaser ā€“versionā€™ in the terminal.

Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Goreleaser().
			Version(ctx)
}

showEnvVars() šŸ”—

ShowEnvVars runs the ā€˜printenvā€™ command to show the environment variables.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
envVars[String ! ] []envVars is a map of environment (but as a slice) variables to pass from the host to the container.
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Goreleaser().
			ShowEnvVars(ctx)
}

check() šŸ”—

Check runs the ā€˜goreleaser checkā€™ command. Itā€™s equivalent to running ā€˜goreleaser checkā€™ in the terminal.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-src is the source directory.
cfgString -cfg is the configuration file to use.
argsString -args is the arguments to pass to the 'goreleaser' command.
Example
func (m *myModule) example(ctx context.Context, src *Directory) string  {
	return dag.
			Goreleaser().
			Check(ctx, src)
}

build() šŸ”—

Build runs the ā€˜goreleaser buildā€™ command. Itā€™s equivalent to running ā€˜goreleaser buildā€™ in the terminal.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-src is the directory that contains all the source code, including the module directory.
cfgString -cfg is the configuration file to use. default=".goreleaser.yaml"
cleanBoolean -clean ensures that if there's a previous build, it will be cleaned.
envVars[String ! ] -envVars is a list of environment variables to pass from the host to the container.
argsString -args is the arguments to pass to the 'goreleaser' command.
Example
func (m *myModule) example(ctx context.Context, src *Directory) string  {
	return dag.
			Goreleaser().
			Build(ctx, src)
}

snapshot() šŸ”—

Snapshot runs the ā€˜goreleaser releaseā€™ command. Itā€™s equivalent to running ā€˜goreleaser release ā€“snapshotā€™ in the terminal.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
cfgString -cfg is the configuration file to use.
autoSnapshotBoolean -autoSnapshot ensures that the snapshot is automatically set if the repository is dirty
cleanBoolean -clean ensures that if there's a previous build, it will be cleaned. default=false
envVars[String ! ] []envVars is a list of environment variables to pass from the host to the container.
argsString -args is the arguments to pass to the 'goreleaser' command.
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Goreleaser().
			Snapshot(ctx)
}

release() šŸ”—

Release runs the ā€˜goreleaser releaseā€™ command. Itā€™s equivalent to running ā€˜goreleaser release ā€“snapshotā€™ in the terminal.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
cfgString -cfg is the configuration file to use.
autoSnapshotBoolean -autoSnapshot ensures that the snapshot is automatically set if the repository is dirty
cleanBoolean -clean ensures that if there's a previous build, it will be cleaned. default=false
envVars[String ! ] []envVars is a list of environment variables to pass from the host to the container.
argsString -args is the arguments to pass to the 'goreleaser' command.
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Goreleaser().
			Release(ctx)
}