goreleaser
No long description provided.
Installation
dagger install github.com/developer-guy/excoriate-daggerverse/goreleaser@b4bc20faec104b7f45c9a429b20f7d39d1531b79
Entrypoint
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. |
ctr | Container | - | Ctrl is the container to use as a base container. |
envVarsFromHost | String | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
cfgFile | String | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
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
Name | Type | Default Value | Description |
---|---|---|---|
key | String ! | - | No description provided |
value | String ! | - | No description provided |
expand | Boolean ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
imageUrl | String ! | - | 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
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
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
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | src is the source directory. |
cfg | String | - | cfg is the configuration file to use. |
args | String | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | src is the directory that contains all the source code, including the module directory. |
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
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
Name | Type | Default Value | Description |
---|---|---|---|
cfg | String | - | cfg is the configuration file to use. |
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
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
Name | Type | Default Value | Description |
---|---|---|---|
cfg | String | - | cfg is the configuration file to use. |
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
func (m *myModule) example(ctx context.Context) string {
return dag.
Goreleaser().
Release(ctx)
}