Dagger
Search

mod-releaser

A module for handling module release in daggerverse

Installation

dagger install github.com/Dudesons/daggerverse/mod-releaser@v0.2.1

Entrypoint

Return Type
ModReleaser !
Arguments
NameTypeDescription
gitRepoDirectory !A git repository where the release process will be applied
componentString !The module name to publish
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string
func (m *myModule) example(gitRepo *Directory, component string) *ModReleaser  {
	return dag.
			ModReleaser(gitRepo, component)
}
@function
def example(git_repo: dagger.Directory, component: str) -> dag.ModReleaser:
	return (
		dag.mod_releaser(git_repo, component)
	)
@func()
example(gitRepo: Directory, component: string): ModReleaser {
	return dag
		.modReleaser(gitRepo, component)
}

Types

ModReleaser 🔗

tags() 🔗

Return Type
[String ! ] !
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string tags
func (m *myModule) example(ctx context.Context, gitRepo *Directory, component string) []string  {
	return dag.
			ModReleaser(gitRepo, component).
			Tags(ctx)
}
@function
async def example(git_repo: dagger.Directory, component: str) -> List[str]:
	return await (
		dag.mod_releaser(git_repo, component)
		.tags()
	)
@func()
async example(gitRepo: Directory, component: string): Promise<string[]> {
	return dag
		.modReleaser(gitRepo, component)
		.tags()
}

tag() 🔗

Return Type
String !
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string tag
func (m *myModule) example(ctx context.Context, gitRepo *Directory, component string) string  {
	return dag.
			ModReleaser(gitRepo, component).
			Tag(ctx)
}
@function
async def example(git_repo: dagger.Directory, component: str) -> str:
	return await (
		dag.mod_releaser(git_repo, component)
		.tag()
	)
@func()
async example(gitRepo: Directory, component: string): Promise<string> {
	return dag
		.modReleaser(gitRepo, component)
		.tag()
}

withContainer() 🔗

Allow to override the current container

Return Type
ModReleaser !
Arguments
NameTypeDefault ValueDescription
ctrContainer !-No description provided
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string with-container --ctr IMAGE:TAG
func (m *myModule) example(gitRepo *Directory, component string, ctr *Container) *ModReleaser  {
	return dag.
			ModReleaser(gitRepo, component).
			WithContainer(ctr)
}
@function
def example(git_repo: dagger.Directory, component: str, ctr: dagger.Container) -> dag.ModReleaser:
	return (
		dag.mod_releaser(git_repo, component)
		.with_container(ctr)
	)
@func()
example(gitRepo: Directory, component: string, ctr: Container): ModReleaser {
	return dag
		.modReleaser(gitRepo, component)
		.withContainer(ctr)
}

shell() 🔗

Open a shell

Return Type
Container !
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string shell
func (m *myModule) example(gitRepo *Directory, component string) *Container  {
	return dag.
			ModReleaser(gitRepo, component).
			Shell()
}
@function
def example(git_repo: dagger.Directory, component: str) -> dagger.Container:
	return (
		dag.mod_releaser(git_repo, component)
		.shell()
	)
@func()
example(gitRepo: Directory, component: string): Container {
	return dag
		.modReleaser(gitRepo, component)
		.shell()
}

withGitConfig() 🔗

Setup global git config, it won’t affect the git config of the local repository

Return Type
ModReleaser !
Arguments
NameTypeDefault ValueDescription
cfgFile -A path to a git config file to use
emailString -the email to use in the git config
nameString -the username to use in the git config
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string with-git-config
func (m *myModule) example(gitRepo *Directory, component string) *ModReleaser  {
	return dag.
			ModReleaser(gitRepo, component).
			WithGitConfig()
}
@function
def example(git_repo: dagger.Directory, component: str) -> dag.ModReleaser:
	return (
		dag.mod_releaser(git_repo, component)
		.with_git_config()
	)
@func()
example(gitRepo: Directory, component: string): ModReleaser {
	return dag
		.modReleaser(gitRepo, component)
		.withGitConfig()
}

withSshKeys() 🔗

Mount ssh keys from the host

Return Type
ModReleaser !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-The directory with ssh keys to mount
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string with-ssh-keys --src DIR_PATH
func (m *myModule) example(gitRepo *Directory, component string, src *Directory) *ModReleaser  {
	return dag.
			ModReleaser(gitRepo, component).
			WithSshKeys(src)
}
@function
def example(git_repo: dagger.Directory, component: str, src: dagger.Directory) -> dag.ModReleaser:
	return (
		dag.mod_releaser(git_repo, component)
		.with_ssh_keys(src)
	)
@func()
example(gitRepo: Directory, component: string, src: Directory): ModReleaser {
	return dag
		.modReleaser(gitRepo, component)
		.withSshKeys(src)
}

withBranch() 🔗

Select a specific git branch

Return Type
ModReleaser !
Arguments
NameTypeDefault ValueDescription
branchString "main"Define the branch from where to publish
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string with-branch
func (m *myModule) example(gitRepo *Directory, component string) *ModReleaser  {
	return dag.
			ModReleaser(gitRepo, component).
			WithBranch()
}
@function
def example(git_repo: dagger.Directory, component: str) -> dag.ModReleaser:
	return (
		dag.mod_releaser(git_repo, component)
		.with_branch()
	)
@func()
example(gitRepo: Directory, component: string): ModReleaser {
	return dag
		.modReleaser(gitRepo, component)
		.withBranch()
}

major() 🔗

Increase the major version

Return Type
ModReleaser !
Arguments
NameTypeDefault ValueDescription
msgString -Define a custom message for the git tag otherwise it will be the default from the function
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string major
func (m *myModule) example(gitRepo *Directory, component string) *ModReleaser  {
	return dag.
			ModReleaser(gitRepo, component).
			Major()
}
@function
def example(git_repo: dagger.Directory, component: str) -> dag.ModReleaser:
	return (
		dag.mod_releaser(git_repo, component)
		.major()
	)
@func()
example(gitRepo: Directory, component: string): ModReleaser {
	return dag
		.modReleaser(gitRepo, component)
		.major()
}

minor() 🔗

Increase the minor version

Return Type
ModReleaser !
Arguments
NameTypeDefault ValueDescription
msgString -Define a custom message for the git tag otherwise it will be the default from the function
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string minor
func (m *myModule) example(gitRepo *Directory, component string) *ModReleaser  {
	return dag.
			ModReleaser(gitRepo, component).
			Minor()
}
@function
def example(git_repo: dagger.Directory, component: str) -> dag.ModReleaser:
	return (
		dag.mod_releaser(git_repo, component)
		.minor()
	)
@func()
example(gitRepo: Directory, component: string): ModReleaser {
	return dag
		.modReleaser(gitRepo, component)
		.minor()
}

patch() 🔗

Increase the patch version

Return Type
ModReleaser !
Arguments
NameTypeDefault ValueDescription
msgString -Define a custom message for the git tag otherwise it will be the default from the function
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string patch
func (m *myModule) example(gitRepo *Directory, component string) *ModReleaser  {
	return dag.
			ModReleaser(gitRepo, component).
			Patch()
}
@function
def example(git_repo: dagger.Directory, component: str) -> dag.ModReleaser:
	return (
		dag.mod_releaser(git_repo, component)
		.patch()
	)
@func()
example(gitRepo: Directory, component: string): ModReleaser {
	return dag
		.modReleaser(gitRepo, component)
		.patch()
}

publish() 🔗

Publish the git tag and the module

Return Type
ModReleaser !
Arguments
NameTypeDefault ValueDescription
gitPushBoolean -Indicate if the publish process should git push the tag
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string publish
func (m *myModule) example(gitRepo *Directory, component string) *ModReleaser  {
	return dag.
			ModReleaser(gitRepo, component).
			Publish()
}
@function
def example(git_repo: dagger.Directory, component: str) -> dag.ModReleaser:
	return (
		dag.mod_releaser(git_repo, component)
		.publish()
	)
@func()
example(gitRepo: Directory, component: string): ModReleaser {
	return dag
		.modReleaser(gitRepo, component)
		.publish()
}

repository() 🔗

Return the git repository

Return Type
Directory !
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string repository
func (m *myModule) example(gitRepo *Directory, component string) *Directory  {
	return dag.
			ModReleaser(gitRepo, component).
			Repository()
}
@function
def example(git_repo: dagger.Directory, component: str) -> dagger.Directory:
	return (
		dag.mod_releaser(git_repo, component)
		.repository()
	)
@func()
example(gitRepo: Directory, component: string): Directory {
	return dag
		.modReleaser(gitRepo, component)
		.repository()
}

do() 🔗

Execute all commands

Return Type
String !
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
 --git-repo DIR_PATH --component string do
func (m *myModule) example(ctx context.Context, gitRepo *Directory, component string) string  {
	return dag.
			ModReleaser(gitRepo, component).
			Do(ctx)
}
@function
async def example(git_repo: dagger.Directory, component: str) -> str:
	return await (
		dag.mod_releaser(git_repo, component)
		.do()
	)
@func()
async example(gitRepo: Directory, component: string): Promise<string> {
	return dag
		.modReleaser(gitRepo, component)
		.do()
}