Dagger
Search

version

In general, it attempts to follow go's psedudoversioning:
https://go.dev/doc/modules/version-numbers

Installation

dagger install github.com/dagger/dagger/version@f4f41af8527786deed8c90a8c010594dfbc939b6

Entrypoint

Return Type
Version !
Arguments
NameTypeDescription
inputsDirectory 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
gitDirDirectory No description provided
changesDirectory .changes file used to extract version information
Example
dagger -m github.com/dagger/dagger/version@f4f41af8527786deed8c90a8c010594dfbc939b6 call \
func (m *myModule) example() *Version  {
	return dag.
			Version()
}
@function
def example() -> dag.Version:
	return (
		dag.version()
	)
@func()
example(): Version {
	return dag
		.version()
}

Types

Version 🔗

git() 🔗

Return Type
Git !
Example
dagger -m github.com/dagger/dagger/version@f4f41af8527786deed8c90a8c010594dfbc939b6 call \
 git
func (m *myModule) example() *VersionGit  {
	return dag.
			Version().
			Git()
}
@function
def example() -> dag.VersionGit:
	return (
		dag.version()
		.git()
	)
@func()
example(): VersionGit {
	return dag
		.version()
		.git()
}

inputs() 🔗

Return Type
Directory !
Example
dagger -m github.com/dagger/dagger/version@f4f41af8527786deed8c90a8c010594dfbc939b6 call \
 inputs
func (m *myModule) example() *Directory  {
	return dag.
			Version().
			Inputs()
}
@function
def example() -> dagger.Directory:
	return (
		dag.version()
		.inputs()
	)
@func()
example(): Directory {
	return dag
		.version()
		.inputs()
}

changes() 🔗

Return Type
Directory !
Example
dagger -m github.com/dagger/dagger/version@f4f41af8527786deed8c90a8c010594dfbc939b6 call \
 changes
func (m *myModule) example() *Directory  {
	return dag.
			Version().
			Changes()
}
@function
def example() -> dagger.Directory:
	return (
		dag.version()
		.changes()
	)
@func()
example(): Directory {
	return dag
		.version()
		.changes()
}

version() 🔗

Generate a version string from the current context

Return Type
String !
Example
dagger -m github.com/dagger/dagger/version@f4f41af8527786deed8c90a8c010594dfbc939b6 call \
 version
func (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/dagger/dagger/version@f4f41af8527786deed8c90a8c010594dfbc939b6 call \
 image-tag
func (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()
}

lastReleaseVersion() 🔗

Determine the last released version.

Return Type
String !
Example
dagger -m github.com/dagger/dagger/version@f4f41af8527786deed8c90a8c010594dfbc939b6 call \
 last-release-version
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Version().
			LastReleaseVersion(ctx)
}
@function
async def example() -> str:
	return await (
		dag.version()
		.last_release_version()
	)
@func()
async example(): Promise<string> {
	return dag
		.version()
		.lastReleaseVersion()
}

nextReleaseVersion() 🔗

Determine the “next” version to be released.

It first attempts to use the version in .changes/.next, but if this fails, or that version seems to have already been released, then we automagically calculate the next patch release in the current series.

Return Type
String !
Example
dagger -m github.com/dagger/dagger/version@f4f41af8527786deed8c90a8c010594dfbc939b6 call \
 next-release-version
func (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()
}

Git 🔗

Git is an opinionated helper for performing various commands on our dagger repo.

container() 🔗

Return Type
Container !
Example
Function VersionGit.container is not accessible from the version module
Function VersionGit.container is not accessible from the version module
Function VersionGit.container is not accessible from the version module
Function VersionGit.container is not accessible from the version module

valid() 🔗

Return Type
Boolean !
Example
Function VersionGit.valid is not accessible from the version module
Function VersionGit.valid is not accessible from the version module
Function VersionGit.valid is not accessible from the version module
Function VersionGit.valid is not accessible from the version module

versionTagLatest() 🔗

VersionTagLatests gets the latest version tag for a given component

Return Type
Tag !
Arguments
NameTypeDefault ValueDescription
componentString -No description provided
Example
Function VersionGit.versionTagLatest is not accessible from the version module
Function VersionGit.versionTagLatest is not accessible from the version module
Function VersionGit.versionTagLatest is not accessible from the version module
Function VersionGit.versionTagLatest is not accessible from the version module

versionTags() 🔗

VersionTags gets all version tags for a given component - the resulting versions are sorted in ascending order

Return Type
[Tag ! ] !
Arguments
NameTypeDefault ValueDescription
componentString -No description provided
Example
Function VersionGit.versionTags is not accessible from the version module
Function VersionGit.versionTags is not accessible from the version module
Function VersionGit.versionTags is not accessible from the version module
Function VersionGit.versionTags is not accessible from the version module

head() 🔗

Return Type
Commit !
Example
Function VersionGit.head is not accessible from the version module
Function VersionGit.head is not accessible from the version module
Function VersionGit.head is not accessible from the version module
Function VersionGit.head is not accessible from the version module

commit() 🔗

Return Type
Commit !
Arguments
NameTypeDefault ValueDescription
refString !-No description provided
Example
Function VersionGit.commit is not accessible from the version module
Function VersionGit.commit is not accessible from the version module
Function VersionGit.commit is not accessible from the version module
Function VersionGit.commit is not accessible from the version module

mergeBase() 🔗

Return Type
Commit !
Arguments
NameTypeDefault ValueDescription
refString !-No description provided
ref2String !-No description provided
Example
Function VersionGit.mergeBase is not accessible from the version module
Function VersionGit.mergeBase is not accessible from the version module
Function VersionGit.mergeBase is not accessible from the version module
Function VersionGit.mergeBase is not accessible from the version module

dirty() 🔗

Return whether the current git state is dirty

Return Type
Boolean !
Example
Function VersionGit.dirty is not accessible from the version module
Function VersionGit.dirty is not accessible from the version module
Function VersionGit.dirty is not accessible from the version module
Function VersionGit.dirty is not accessible from the version module

fileAt() 🔗

Return Type
String !
Arguments
NameTypeDefault ValueDescription
filenameString !-No description provided
refString !-No description provided
Example
Function VersionGit.fileAt is not accessible from the version module
Function VersionGit.fileAt is not accessible from the version module
Function VersionGit.fileAt is not accessible from the version module
Function VersionGit.fileAt is not accessible from the version module

Tag 🔗

component() 🔗

The component this belongs to.

Return Type
String !
Example
Function VersionTag.component is not accessible from the version module
Function VersionTag.component is not accessible from the version module
Function VersionTag.component is not accessible from the version module
Function VersionTag.component is not accessible from the version module

version() 🔗

The semver version for this component.

Return Type
String !
Example
Function VersionTag.version is not accessible from the version module
Function VersionTag.version is not accessible from the version module
Function VersionTag.version is not accessible from the version module
Function VersionTag.version is not accessible from the version module

commit() 🔗

The commit hash.

Return Type
String !
Example
Function VersionTag.commit is not accessible from the version module
Function VersionTag.commit is not accessible from the version module
Function VersionTag.commit is not accessible from the version module
Function VersionTag.commit is not accessible from the version module

date() 🔗

The tag creator date. Distinct from author date, and not to be confused with the underlying commit date.

Return Type
String !
Example
Function VersionTag.date is not accessible from the version module
Function VersionTag.date is not accessible from the version module
Function VersionTag.date is not accessible from the version module
Function VersionTag.date is not accessible from the version module

Commit 🔗

commit() 🔗

The commit hash.

Return Type
String !
Example
Function VersionCommit.commit is not accessible from the version module
Function VersionCommit.commit is not accessible from the version module
Function VersionCommit.commit is not accessible from the version module
Function VersionCommit.commit is not accessible from the version module

date() 🔗

The commit commit date. Distinct from the author date.

Return Type
String !
Example
Function VersionCommit.date is not accessible from the version module
Function VersionCommit.date is not accessible from the version module
Function VersionCommit.date is not accessible from the version module
Function VersionCommit.date is not accessible from the version module