mod-releaser
A module for handling module release in daggerverse
Installation
dagger install github.com/Dudesons/daggerverse/mod-releaser@v0.3.0Entrypoint
Return Type
ModReleaser !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| gitRepo | Directory ! | - | A git repository where the release process will be applied |
| component | String ! | - | The module name to publish |
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component stringfunc (m *MyModule) Example(gitRepo *dagger.Directory, component string) *dagger.ModReleaser {
return dag.
ModReleaser(gitRepo, component)
}@function
def example(git_repo: dagger.Directory, component: str) -> dagger.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@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component string tagsfunc (m *MyModule) Example(ctx context.Context, gitRepo *dagger.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@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component string tagfunc (m *MyModule) Example(ctx context.Context, gitRepo *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| ctr | Container ! | - | No description provided |
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component string with-container --ctr IMAGE:TAGfunc (m *MyModule) Example(gitRepo *dagger.Directory, component string, ctr *dagger.Container) *dagger.ModReleaser {
return dag.
ModReleaser(gitRepo, component).
WithContainer(ctr)
}@function
def example(git_repo: dagger.Directory, component: str, ctr: dagger.Container) -> dagger.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@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component string shellfunc (m *MyModule) Example(gitRepo *dagger.Directory, component string) *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| cfg | File | - | A path to a git config file to use |
| String | - | the email to use in the git config | |
| name | String | - | the username to use in the git config |
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component string with-git-configfunc (m *MyModule) Example(gitRepo *dagger.Directory, component string) *dagger.ModReleaser {
return dag.
ModReleaser(gitRepo, component).
WithGitConfig()
}@function
def example(git_repo: dagger.Directory, component: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| src | Directory ! | - | The directory with ssh keys to mount |
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component string with-ssh-keys --src DIR_PATHfunc (m *MyModule) Example(gitRepo *dagger.Directory, component string, src *dagger.Directory) *dagger.ModReleaser {
return dag.
ModReleaser(gitRepo, component).
WithSshKeys(src)
}@function
def example(git_repo: dagger.Directory, component: str, src: dagger.Directory) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| branch | String | "main" | Define the branch from where to publish |
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component string with-branchfunc (m *MyModule) Example(gitRepo *dagger.Directory, component string) *dagger.ModReleaser {
return dag.
ModReleaser(gitRepo, component).
WithBranch()
}@function
def example(git_repo: dagger.Directory, component: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| msg | String | - | 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@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component string majorfunc (m *MyModule) Example(gitRepo *dagger.Directory, component string) *dagger.ModReleaser {
return dag.
ModReleaser(gitRepo, component).
Major()
}@function
def example(git_repo: dagger.Directory, component: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| msg | String | - | 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@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component string minorfunc (m *MyModule) Example(gitRepo *dagger.Directory, component string) *dagger.ModReleaser {
return dag.
ModReleaser(gitRepo, component).
Minor()
}@function
def example(git_repo: dagger.Directory, component: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| msg | String | - | 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@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component string patchfunc (m *MyModule) Example(gitRepo *dagger.Directory, component string) *dagger.ModReleaser {
return dag.
ModReleaser(gitRepo, component).
Patch()
}@function
def example(git_repo: dagger.Directory, component: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| gitPush | Boolean | - | Indicate if the publish process should git push the tag |
Example
dagger -m github.com/Dudesons/daggerverse/mod-releaser@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component string publishfunc (m *MyModule) Example(gitRepo *dagger.Directory, component string) *dagger.ModReleaser {
return dag.
ModReleaser(gitRepo, component).
Publish()
}@function
def example(git_repo: dagger.Directory, component: str) -> dagger.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@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component string repositoryfunc (m *MyModule) Example(gitRepo *dagger.Directory, component string) *dagger.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@2e87412257775374c640ecca06a6922c776d6b49 call \
--git-repo DIR_PATH --component string dofunc (m *MyModule) Example(ctx context.Context, gitRepo *dagger.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()
}