Tag GitHub Source
  • 14 May 2021
  • 1 Minute to read
  • Dark
    Light
  • PDF

Tag GitHub Source

  • Dark
    Light
  • PDF

This is generated from the built in components of BuildMaster 7.0.0, and may be different than what you have installed (especially if you have extensions); go to [User Icon] -> Documentation within your BuildMaster instance to see exactly what operations are available.

Tag GitHub Source

Tags the source code in a GitHub repository.

Script usage:

GitHub::Tag(
	[From: <text>],
	[UserName: <text>],
	[Password: <SecureString>],
	[Organization: <text>],
	[Repository: <text>],
	[ApiUrl: <text>],
	Tag: <text>,
	[Message: <text>],
	[Branch: <text>],
	[CommitHash: <text>],
	[Force: <true/false>],
	[GitExePath: <text>],
	[RecurseSubmodules: <true/false>],
	[WorkspaceDiskPath: <text>],
	[CleanWorkspace: <true/false>]
);

Arguments:

NameFormatScript UsageUsage Notes
From GitHub resource
text
From
User name
text
UserName
Password
SecureString
Password
Organization name
text
Organization
Repository name
text
Repository
API URL
text
ApiUrl
Use URL from Github resource.
Tag name
text
Tag
This argument is required.
Tag message
text
Message
When this is not specified, a lightweight tag is created.
Branch name
text
Branch
Commit hash
text
CommitHash
The tag will refer to this commit if specified; otherwise it will refer to the current head.
Force
true/false
Force
Overwrite another tag that has the same name; otherwise using an existing tag name is an error.
Git executable path
text
GitExePath
Recurse submodules
true/false
RecurseSubmodules
Workspace disk path
text
WorkspaceDiskPath
If not set, a workspace name will be automatically generated and persisted based on the Repository URL or other host-specific information (e.g. GitHub's repository name).
Clean workspace
true/false
CleanWorkspace
If set to true, the workspace directory will be cleared before any Git-based operations are performed.

Example:

# tags the current source tree with the current release name and package number
GitHub::Tag(
    Credentials: Hdars-GitHub,
    Organization: Hdars,
    Tag: $ReleaseName.$PackageNumber
);

Was this article helpful?