This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.GitLab.
Summary
Creates a new tag in the project repository
- Assembly
- Cake
.GitLab .dll - Namespace
- Cake
.GitLab - Containing Type
- GitLabAliases
Syntax
public static Task<Tag> GitLabRepositoryCreateTagAsync(this ICakeContext context, string serverUrl, string accessToken, ProjectId project, string ref, string name)
Examples
[TaskName("Create-Tag")]
public class CreateTagTask : FrostingTask
{
public override void Run(ICakeContext context)
{
context.GitLabRepositoryCreateTagAsync(
"https://gitlab.com",
"ACCESSTOKEN"
"owner/repository",
"b5d7135",
"tagName"
);
}
}
Remarks
Creates a tag with the specified name for the specified target reference (commit SHA, branch name or tag name).
If the specified tag already exists for the target commit, creation of the tag is skipped and no error is thrown.
Attributes
Type | Description |
---|---|
Nullable |
|
Async |
|
Cake |
|
Cake |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The current Cake context. |
serverUrl | string | The url of the GitLab server |
accessToken | string | The access token for authenticating to the GitLab server |
project | ProjectId | The path (name and namespace) or id of the project to create a tag in. |
ref | string | The ref to create the tag from. Can be a commit SHA, branch name or existing tag name |
name | string |
Return Value
Type | Description |
---|---|
Task |