Dagger
Search

goreleaser

No long description provided.

Installation

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

Entrypoint

Return Type
Goreleaser !
Arguments
NameTypeDescription
versionString version is the version of the GoReleaser to use, e.g., "v1.22.0".
imageString 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()
}
@function
def example() -> dag.Goreleaser:
	return (
		dag.goreleaser()
	)
@func()
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()
}
@function
def example() -> dagger.Directory:
	return (
		dag.goreleaser()
		.src()
	)
@func()
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()
}
@function
def example() -> dagger.Container:
	return (
		dag.goreleaser()
		.ctr()
	)
@func()
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)
}
@function
async def example() -> str:
	return await (
		dag.goreleaser()
		.cfg_file()
	)
@func()
async example(): Promise<string> {
	return dag
		.goreleaser()
		.cfgFile()
}

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)
}
@function
async def example() -> str:
	return await (
		dag.goreleaser()
		.version()
	)
@func()
async example(): Promise<string> {
	return dag
		.goreleaser()
		.version()
}

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)
}
@function
async def example() -> str:
	return await (
		dag.goreleaser()
		.show_env_vars()
	)
@func()
async example(): Promise<string> {
	return dag
		.goreleaser()
		.showEnvVars()
}

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)
}
@function
async def example(src: dagger.Directory) -> str:
	return await (
		dag.goreleaser()
		.check(src)
	)
@func()
async example(src: Directory): Promise<string> {
	return dag
		.goreleaser()
		.check(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)
}
@function
async def example(src: dagger.Directory) -> str:
	return await (
		dag.goreleaser()
		.build(src)
	)
@func()
async example(src: Directory): Promise<string> {
	return dag
		.goreleaser()
		.build(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)
}
@function
async def example() -> str:
	return await (
		dag.goreleaser()
		.snapshot()
	)
@func()
async example(): Promise<string> {
	return dag
		.goreleaser()
		.snapshot()
}

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)
}
@function
async def example() -> str:
	return await (
		dag.goreleaser()
		.release()
	)
@func()
async example(): Promise<string> {
	return dag
		.goreleaser()
		.release()
}

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()
}
@function
def example() -> dag.Goreleaser:
	return (
		dag.goreleaser()
		.with_go_cache()
	)
@func()
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)
}
@function
def example(src: dagger.Directory) -> dag.Goreleaser:
	return (
		dag.goreleaser()
		.with_source(src)
	)
@func()
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()
}
@function
def example() -> dag.Goreleaser:
	return (
		dag.goreleaser()
		.with_cfg_file()
	)
@func()
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)
}
@function
def example(cmd: List[str]) -> dag.Goreleaser:
	return (
		dag.goreleaser()
		.with_cmd(cmd)
	)
@func()
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)
}
@function
def example(key: str, value: str, expand: bool) -> dag.Goreleaser:
	return (
		dag.goreleaser()
		.with_env_var(key, value, expand)
	)
@func()
example(key: string, value: string, expand: boolean): 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)
}
@function
def example(image_url: str) -> dag.Goreleaser:
	return (
		dag.goreleaser()
		.base(image_url)
	)
@func()
example(imageUrl: string): Goreleaser {
	return dag
		.goreleaser()
		.base(imageUrl)
}