Dagger
Search

goreleaser

A module for Goreleaser Dagger functions

Installation

dagger install github.com/goreleaser/goreleaser@6ef6623d468b73231af6d3b8a2f230dc72039cf5

Entrypoint

Return Type
Goreleaser !
Arguments
NameTypeDescription
sourceDirectory The Goreleaser source code to use
Example
dagger -m github.com/goreleaser/goreleaser@6ef6623d468b73231af6d3b8a2f230dc72039cf5 call \
func (m *myModule) example() *Goreleaser  {
	return dag.
			Goreleaser()
}
@function
def example() -> dag.Goreleaser:
	return (
		dag.goreleaser()
	)
@func()
example(): Goreleaser {
	return dag
		.goreleaser()
}

Types

Goreleaser 🔗

test() 🔗

Test Goreleaser

Return Type
TestResult !
Example
dagger -m github.com/goreleaser/goreleaser@6ef6623d468b73231af6d3b8a2f230dc72039cf5 call \
 test
func (m *myModule) example() *GoreleaserTestResult  {
	return dag.
			Goreleaser().
			Test()
}
@function
def example() -> dag.GoreleaserTestResult:
	return (
		dag.goreleaser()
		.test()
	)
@func()
example(): GoreleaserTestResult {
	return dag
		.goreleaser()
		.test()
}

testEnv() 🔗

Container to test Goreleaser

Return Type
Container !
Example
dagger -m github.com/goreleaser/goreleaser@6ef6623d468b73231af6d3b8a2f230dc72039cf5 call \
 test-env
func (m *myModule) example() *Container  {
	return dag.
			Goreleaser().
			TestEnv()
}
@function
def example() -> dagger.Container:
	return (
		dag.goreleaser()
		.test_env()
	)
@func()
example(): Container {
	return dag
		.goreleaser()
		.testEnv()
}

lint() 🔗

Lint Goreleaser

Return Type
String !
Arguments
NameTypeDefault ValueDescription
golangciLintVersionString !"v1.58.1"Version of golangci-lint to use
Example
dagger -m github.com/goreleaser/goreleaser@6ef6623d468b73231af6d3b8a2f230dc72039cf5 call \
 lint --golangci-lint-version string
func (m *myModule) example(ctx context.Context, golangciLintVersion string) string  {
	return dag.
			Goreleaser().
			Lint(ctx, golangciLintVersion)
}
@function
async def example(golangci_lint_version: str) -> str:
	return await (
		dag.goreleaser()
		.lint(golangci_lint_version)
	)
@func()
async example(golangciLintVersion: string): Promise<string> {
	return dag
		.goreleaser()
		.lint(golangciLintVersion)
}

build() 🔗

Build Goreleaser

Return Type
File !
Arguments
NameTypeDefault ValueDescription
osString !"linux"Target OS to build
archString -Target architecture to build
Example
dagger -m github.com/goreleaser/goreleaser@6ef6623d468b73231af6d3b8a2f230dc72039cf5 call \
 build --os string
func (m *myModule) example(os string) *File  {
	return dag.
			Goreleaser().
			Build(os)
}
@function
def example(os: str) -> dagger.File:
	return (
		dag.goreleaser()
		.build(os)
	)
@func()
example(os: string): File {
	return dag
		.goreleaser()
		.build(os)
}

base() 🔗

Base container to build and test Goreleaser

Return Type
Container !
Example
dagger -m github.com/goreleaser/goreleaser@6ef6623d468b73231af6d3b8a2f230dc72039cf5 call \
 base
func (m *myModule) example() *Container  {
	return dag.
			Goreleaser().
			Base()
}
@function
def example() -> dagger.Container:
	return (
		dag.goreleaser()
		.base()
	)
@func()
example(): Container {
	return dag
		.goreleaser()
		.base()
}

buildEnv() 🔗

Container to build Goreleaser

Return Type
Container !
Example
dagger -m github.com/goreleaser/goreleaser@6ef6623d468b73231af6d3b8a2f230dc72039cf5 call \
 build-env
func (m *myModule) example() *Container  {
	return dag.
			Goreleaser().
			BuildEnv()
}
@function
def example() -> dagger.Container:
	return (
		dag.goreleaser()
		.build_env()
	)
@func()
example(): Container {
	return dag
		.goreleaser()
		.buildEnv()
}

run() 🔗

Run Goreleaser

Return Type
String !
Arguments
NameTypeDefault ValueDescription
contextDirectory !-Context directory to run in
args[String ! ] !-Arguments to pass to Goreleaser
Example
dagger -m github.com/goreleaser/goreleaser@6ef6623d468b73231af6d3b8a2f230dc72039cf5 call \
 run --context DIR_PATH --args string1 --args string2
func (m *myModule) example(ctx context.Context, context *Directory, args []string) string  {
	return dag.
			Goreleaser().
			Run(ctx, context, args)
}
@function
async def example(context: dagger.Directory, args: List[str]) -> str:
	return await (
		dag.goreleaser()
		.run(context, args)
	)
@func()
async example(context: Directory, args: string[]): Promise<string> {
	return dag
		.goreleaser()
		.run(context, args)
}

TestResult 🔗

Custom type for test results

container() 🔗

Container with the test executed

Return Type
Container !
Example
dagger -m github.com/goreleaser/goreleaser@6ef6623d468b73231af6d3b8a2f230dc72039cf5 call \
 test \
 container
func (m *myModule) example() *Container  {
	return dag.
			Goreleaser().
			Test().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.goreleaser()
		.test()
		.container()
	)
@func()
example(): Container {
	return dag
		.goreleaser()
		.test()
		.container()
}

coverageReport() 🔗

Coverage report from the test. Save with ‘-o ./coverage.txt’

Return Type
File !
Example
dagger -m github.com/goreleaser/goreleaser@6ef6623d468b73231af6d3b8a2f230dc72039cf5 call \
 test \
 coverage-report
func (m *myModule) example() *File  {
	return dag.
			Goreleaser().
			Test().
			CoverageReport()
}
@function
def example() -> dagger.File:
	return (
		dag.goreleaser()
		.test()
		.coverage_report()
	)
@func()
example(): File {
	return dag
		.goreleaser()
		.test()
		.coverageReport()
}

output() 🔗

Stdout from the test command

Return Type
String !
Example
dagger -m github.com/goreleaser/goreleaser@6ef6623d468b73231af6d3b8a2f230dc72039cf5 call \
 test \
 output
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Goreleaser().
			Test().
			Output(ctx)
}
@function
async def example() -> str:
	return await (
		dag.goreleaser()
		.test()
		.output()
	)
@func()
async example(): Promise<string> {
	return dag
		.goreleaser()
		.test()
		.output()
}