Dagger
Search

calver

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/telchak/daggerverse/calver@v2026.3.5

Entrypoint

Return Type
Calver !
Example
dagger -m github.com/telchak/daggerverse/calver@c74ee6e9fafe17c3f5186a1d995a7739f89e50ef call \
func (m *MyModule) Example() *dagger.Calver  {
	return dag.
			Calver()
}
@function
def example() -> dagger.Calver:
	return (
		dag.calver()
	)
@func()
example(): Calver {
	return dag
		.calver()
}

Types

Calver 🔗

Calendar Versioning (CalVer) utilities.

generate() 🔗

Generate CalVer version string based on current date.

If the current commit already has a CalVer tag matching the pattern, that existing tag is returned (preventing duplicate tags on same commit). Otherwise, generates a new version and optionally pushes the tag.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
formatString !"YYYY.MM.DD"CalVer format (YYYY.MM.DD, v.YYYY.MM.MICRO, etc.)
microInteger !0Manual micro/patch version
sourceDirectory nullGit repo (enables auto-increment)
pushTagBoolean !falsePush generated tag to remote repository
githubTokenSecret nullGitHub token for pushing tags
Example
dagger -m github.com/telchak/daggerverse/calver@c74ee6e9fafe17c3f5186a1d995a7739f89e50ef call \
 generate --format string --micro integer --push-tag boolean
func (m *MyModule) Example(ctx context.Context, format string, micro int, pushTag bool) string  {
	return dag.
			Calver().
			Generate(ctx, format, micro, pushTag)
}
@function
async def example(format: str, micro: int, push_tag: bool) -> str:
	return await (
		dag.calver()
		.generate(format, micro, push_tag)
	)
@func()
async example(format: string, micro: number, pushTag: boolean): Promise<string> {
	return dag
		.calver()
		.generate(format, micro, pushTag)
}