calver
This module has been generated via dagger init and serves as a reference tobasic 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.5Entrypoint
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
| Name | Type | Default Value | Description |
|---|---|---|---|
| format | String ! | "YYYY.MM.DD" | CalVer format (YYYY.MM.DD, v.YYYY.MM.MICRO, etc.) |
| micro | Integer ! | 0 | Manual micro/patch version |
| source | Directory | null | Git repo (enables auto-increment) |
| pushTag | Boolean ! | false | Push generated tag to remote repository |
| githubToken | Secret | null | GitHub token for pushing tags |
Example
dagger -m github.com/telchak/daggerverse/calver@c74ee6e9fafe17c3f5186a1d995a7739f89e50ef call \
generate --format string --micro integer --push-tag booleanfunc (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)
}