version
In general, it attempts to follow go's psedudoversioning:https://go.dev/doc/modules/version-numbers
Installation
dagger install github.com/matipan/dagger/version@e397a74bc319bb3f1c76d0adf60550b8d8cccef2Entrypoint
Return Type
Version !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| git | Directory | - | A git repository containing the source code of the artifact to be versioned. |
| inputs | Directory | - | A directory containing all the inputs of the artifact to be versioned. An input is any file that changes the artifact if it changes. This directory is used to compute a digest. If any input changes, the digest changes. - To avoid false positives, only include actual inputs - To avoid false negatives, include *all* inputs |
| nextVersionFile | File | - | File containing the next release version (e.g. .changes/.next) |
Example
dagger -m github.com/matipan/dagger/version@e397a74bc319bb3f1c76d0adf60550b8d8cccef2 call \
func (m *MyModule) Example() *dagger.Version {
return dag.
Version()
}@function
def example() -> dagger.Version:
return (
dag.version()
)@func()
example(): Version {
return dag
.version()
}Types
Version 🔗
gitDir() 🔗
Return Type
Directory ! Example
dagger -m github.com/matipan/dagger/version@e397a74bc319bb3f1c76d0adf60550b8d8cccef2 call \
git-dirfunc (m *MyModule) Example() *dagger.Directory {
return dag.
Version().
GitDir()
}@function
def example() -> dagger.Directory:
return (
dag.version()
.git_dir()
)@func()
example(): Directory {
return dag
.version()
.gitDir()
}version() 🔗
Generate a version string from the current context
Return Type
String ! Example
dagger -m github.com/matipan/dagger/version@e397a74bc319bb3f1c76d0adf60550b8d8cccef2 call \
versionfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Version().
Version(ctx)
}@function
async def example() -> str:
return await (
dag.version()
.version()
)@func()
async example(): Promise<string> {
return dag
.version()
.version()
}imageTag() 🔗
Return the tag to use when auto-downloading the engine image from the CLI
Return Type
String ! Example
dagger -m github.com/matipan/dagger/version@e397a74bc319bb3f1c76d0adf60550b8d8cccef2 call \
image-tagfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Version().
ImageTag(ctx)
}@function
async def example() -> str:
return await (
dag.version()
.image_tag()
)@func()
async example(): Promise<string> {
return dag
.version()
.imageTag()
}dirty() 🔗
Return Type
Boolean ! Example
dagger -m github.com/matipan/dagger/version@e397a74bc319bb3f1c76d0adf60550b8d8cccef2 call \
dirtyfunc (m *MyModule) Example(ctx context.Context) bool {
return dag.
Version().
Dirty(ctx)
}@function
async def example() -> bool:
return await (
dag.version()
.dirty()
)@func()
async example(): Promise<boolean> {
return dag
.version()
.dirty()
}currentTag() 🔗
Return Type
String ! Example
dagger -m github.com/matipan/dagger/version@e397a74bc319bb3f1c76d0adf60550b8d8cccef2 call \
current-tagfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Version().
CurrentTag(ctx)
}@function
async def example() -> str:
return await (
dag.version()
.current_tag()
)@func()
async example(): Promise<string> {
return dag
.version()
.currentTag()
}nextReleaseVersion() 🔗
NextReleaseVersion returns the next release version from .changes/.next
Return Type
String ! Example
dagger -m github.com/matipan/dagger/version@e397a74bc319bb3f1c76d0adf60550b8d8cccef2 call \
next-release-versionfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Version().
NextReleaseVersion(ctx)
}@function
async def example() -> str:
return await (
dag.version()
.next_release_version()
)@func()
async example(): Promise<string> {
return dag
.version()
.nextReleaseVersion()
}