goreleaser
No long description provided.
Installation
dagger install github.com/Excoriate/daggerverse/goreleaser@v1.9.0Entrypoint
Return Type
Goreleaser !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | "latest" | version is the version of the GoReleaser to use, e.g., "v1.22.0". |
| image | String | "goreleaser/goreleaser" | image is the image to use as the base container. |
| src | Directory ! | - | src is the directory that contains all the source code, including the module directory. |
| ctr | Container | - | Ctrl is the container to use as a base container. |
Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATHfunc (m *MyModule) Example(src *dagger.Directory) *dagger.Goreleaser {
return dag.
Goreleaser(src)
}@function
def example(src: dagger.Directory, ) -> dagger.Goreleaser:
return (
dag.goreleaser(src)
)@func()
example(src: Directory, ): Goreleaser {
return dag
.goreleaser(src)
}Types
Goreleaser 🔗
src() 🔗
Src is the directory that contains all the source code, including the module directory.
Return Type
Directory ! Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH srcfunc (m *MyModule) Example(src *dagger.Directory) *dagger.Directory {
return dag.
Goreleaser(src).
Src()
}@function
def example(src: dagger.Directory, ) -> dagger.Directory:
return (
dag.goreleaser(src)
.src()
)@func()
example(src: Directory, ): Directory {
return dag
.goreleaser(src)
.src()
}ctr() 🔗
Ctr is the container to use as a base container.
Return Type
Container ! Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH ctrfunc (m *MyModule) Example(src *dagger.Directory) *dagger.Container {
return dag.
Goreleaser(src).
Ctr()
}@function
def example(src: dagger.Directory, ) -> dagger.Container:
return (
dag.goreleaser(src)
.ctr()
)@func()
example(src: Directory, ): Container {
return dag
.goreleaser(src)
.ctr()
}cfgFile() 🔗
CfgFile is the configuration file to use.
Return Type
String ! Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH cfg-filefunc (m *MyModule) Example(ctx context.Context, src *dagger.Directory) string {
return dag.
Goreleaser(src).
CfgFile(ctx)
}@function
async def example(src: dagger.Directory, ) -> str:
return await (
dag.goreleaser(src)
.cfg_file()
)@func()
async example(src: Directory, ): Promise<string> {
return dag
.goreleaser(src)
.cfgFile()
}envVarsFromHost() 🔗
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.
Return Type
[String ! ] ! Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH env-vars-from-hostfunc (m *MyModule) Example(ctx context.Context, src *dagger.Directory) []string {
return dag.
Goreleaser(src).
EnvVarsFromHost(ctx)
}@function
async def example(src: dagger.Directory, ) -> List[str]:
return await (
dag.goreleaser(src)
.env_vars_from_host()
)@func()
async example(src: Directory, ): Promise<string[]> {
return dag
.goreleaser(src)
.envVarsFromHost()
}withCfgFile() 🔗
WithCfgFile sets the configuration file to use. The default configuration file is “.goreleaser.yaml”.
Return Type
Goreleaser !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| cfgFile | String | - | cfgFile is the configuration file to use. default=".goreleaser.yaml" |
Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH with-cfg-filefunc (m *MyModule) Example(src *dagger.Directory) *dagger.Goreleaser {
return dag.
Goreleaser(src).
WithCfgFile()
}@function
def example(src: dagger.Directory, ) -> dagger.Goreleaser:
return (
dag.goreleaser(src)
.with_cfg_file()
)@func()
example(src: Directory, ): Goreleaser {
return dag
.goreleaser(src)
.withCfgFile()
}withPrintEnv() 🔗
WithPrintEnv passes environment variables from the host to the container.
Return Type
Goreleaser !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| envVars | [String ! ] | [] | envVars 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
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH with-print-envfunc (m *MyModule) Example(src *dagger.Directory) *dagger.Goreleaser {
return dag.
Goreleaser(src).
WithPrintEnv()
}@function
def example(src: dagger.Directory, ) -> dagger.Goreleaser:
return (
dag.goreleaser(src)
.with_print_env()
)@func()
example(src: Directory, ): Goreleaser {
return dag
.goreleaser(src)
.withPrintEnv()
}withGoCache() 🔗
WithGoCache mounts the Go cache directories. The Go cache directories are: - /go/pkg/mod - /root/.cache/go-build
Return Type
Goreleaser ! Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH with-go-cachefunc (m *MyModule) Example(src *dagger.Directory) *dagger.Goreleaser {
return dag.
Goreleaser(src).
WithGoCache()
}@function
def example(src: dagger.Directory, ) -> dagger.Goreleaser:
return (
dag.goreleaser(src)
.with_go_cache()
)@func()
example(src: Directory, ): Goreleaser {
return dag
.goreleaser(src)
.withGoCache()
}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
| Name | Type | Default Value | Description |
|---|---|---|---|
| image | String ! | - | No description provided |
| version | String ! | - | No description provided |
Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH base --image string --version stringfunc (m *MyModule) Example(src *dagger.Directory, image string, version string) *dagger.Goreleaser {
return dag.
Goreleaser(src).
Base(image, version)
}@function
def example(src: dagger.Directory, image: str, version: str) -> dagger.Goreleaser:
return (
dag.goreleaser(src)
.base(image, version)
)@func()
example(src: Directory, image: string, version: string): Goreleaser {
return dag
.goreleaser(src)
.base(image, version)
}version() 🔗
Version runs the ‘goreleaser –version’ command. It’s equivalent to running ‘goreleaser –version’ in the terminal.
Return Type
String ! Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH versionfunc (m *MyModule) Example(ctx context.Context, src *dagger.Directory) string {
return dag.
Goreleaser(src).
Version(ctx)
}@function
async def example(src: dagger.Directory, ) -> str:
return await (
dag.goreleaser(src)
.version()
)@func()
async example(src: Directory, ): Promise<string> {
return dag
.goreleaser(src)
.version()
}check() 🔗
Check runs the ‘goreleaser check’ command. It’s equivalent to running ‘goreleaser check’ in the terminal.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| cfg | String | - | cfg is the configuration file to use. default=".goreleaser.yaml" |
| args | String | - | args is the arguments to pass to the 'goreleaser' command. |
Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH checkfunc (m *MyModule) Example(ctx context.Context, src *dagger.Directory) string {
return dag.
Goreleaser(src).
Check(ctx)
}@function
async def example(src: dagger.Directory, ) -> str:
return await (
dag.goreleaser(src)
.check()
)@func()
async example(src: Directory, ): Promise<string> {
return dag
.goreleaser(src)
.check()
}showEnvVars() 🔗
ShowEnvVars runs the ‘printenv’ command to show the environment variables.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| envVars | [String ! ] | [] | envVars is a map of environment (but as a slice) variables to pass from the host to the container. |
Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH show-env-varsfunc (m *MyModule) Example(ctx context.Context, src *dagger.Directory) string {
return dag.
Goreleaser(src).
ShowEnvVars(ctx)
}@function
async def example(src: dagger.Directory, ) -> str:
return await (
dag.goreleaser(src)
.show_env_vars()
)@func()
async example(src: Directory, ): Promise<string> {
return dag
.goreleaser(src)
.showEnvVars()
}build() 🔗
Build runs the ‘goreleaser build’ command. It’s equivalent to running ‘goreleaser build’ in the terminal.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| cfg | String | - | cfg is the configuration file to use. default=".goreleaser.yaml" |
| clean | Boolean | - | 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. |
| args | String | - | args is the arguments to pass to the 'goreleaser' command. |
Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH buildfunc (m *MyModule) Example(ctx context.Context, src *dagger.Directory) string {
return dag.
Goreleaser(src).
Build(ctx)
}@function
async def example(src: dagger.Directory, ) -> str:
return await (
dag.goreleaser(src)
.build()
)@func()
async example(src: Directory, ): Promise<string> {
return dag
.goreleaser(src)
.build()
}snapshot() 🔗
Snapshot runs the ‘goreleaser release’ command. It’s equivalent to running ‘goreleaser release –snapshot’ in the terminal.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| cfg | String | - | cfg is the configuration file to use. default=".goreleaser.yaml" |
| autoSnapshot | Boolean | - | autoSnapshot ensures that the snapshot is automatically set if the repository is dirty |
| clean | Boolean | - | 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. |
| args | String | - | args is the arguments to pass to the 'goreleaser' command. |
Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH snapshotfunc (m *MyModule) Example(ctx context.Context, src *dagger.Directory) string {
return dag.
Goreleaser(src).
Snapshot(ctx)
}@function
async def example(src: dagger.Directory, ) -> str:
return await (
dag.goreleaser(src)
.snapshot()
)@func()
async example(src: Directory, ): Promise<string> {
return dag
.goreleaser(src)
.snapshot()
}release() 🔗
Release runs the ‘goreleaser release’ command. It’s equivalent to running ‘goreleaser release –snapshot’ in the terminal.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| cfg | String | - | cfg is the configuration file to use. default=".goreleaser.yaml" |
| autoSnapshot | Boolean | - | autoSnapshot ensures that the snapshot is automatically set if the repository is dirty |
| clean | Boolean | - | 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. |
| args | String | - | args is the arguments to pass to the 'goreleaser' command. |
Example
dagger -m github.com/Excoriate/daggerverse/goreleaser@9c8fa25c61133a2ea58f9f06d7326c7829fc0d2c call \
--src DIR_PATH releasefunc (m *MyModule) Example(ctx context.Context, src *dagger.Directory) string {
return dag.
Goreleaser(src).
Release(ctx)
}@function
async def example(src: dagger.Directory, ) -> str:
return await (
dag.goreleaser(src)
.release()
)@func()
async example(src: Directory, ): Promise<string> {
return dag
.goreleaser(src)
.release()
}