Dagger
Search

version

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

Installation

dagger install github.com/shykes/dagger/version@d37a9557bc70da0b29a8774cf954c3376ea89793

Entrypoint

Return Type
Version !
Arguments
NameTypeDefault ValueDescription
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/shykes/dagger/version@d37a9557bc70da0b29a8774cf954c3376ea89793 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 🔗

version() 🔗

Generate a version string from the current context

Return Type
String !
Example
dagger -m github.com/shykes/dagger/version@d37a9557bc70da0b29a8774cf954c3376ea89793 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/shykes/dagger/version@d37a9557bc70da0b29a8774cf954c3376ea89793 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/shykes/dagger/version@d37a9557bc70da0b29a8774cf954c3376ea89793 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/shykes/dagger/version@d37a9557bc70da0b29a8774cf954c3376ea89793 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()
}