add_git_tag
Community Action Reference: Inspected directly from Fastlane core ruby gem definitions.
Supported Platforms: ios, android, mac
This will add an annotated git tag to the current branch
Details
This will automatically tag your build with the following format: <grouping>/<lane>/<prefix><build_number><postfix>, where:|
|
groupingis just to keep your tags organised under one ‘folder’, defaults to ‘builds’|
laneis the name of the current fastlane lane, if chosen to be included via ‘includes_lane’ option, which defaults to ‘true’|prefixis anything you want to stick in front of the version number, e.g. ‘v’|postfixis anything you want to stick at the end of the version number, e.g. ‘-RC1’|build_numberis the build number, which defaults to the value emitted by theincrement_build_numberaction|
| For example, for build 1234 in the ‘appstore’ lane, it will tag the commit with
builds/appstore/1234.
Parameters & Options
Total options available: 10
| Key | Type | Env Variable | Default | Required | Description |
|---|---|---|---|---|---|
tag |
String |
FL_GIT_TAG_TAG |
- |
No | Define your own tag text. This will replace all other parameters |
grouping |
String |
FL_GIT_TAG_GROUPING |
builds |
Yes | Is used to keep your tags organised under one ‘folder’ |
includes_lane |
Fastlane::Boolean |
FL_GIT_TAG_INCLUDES_LANE |
true |
Yes | Whether the current lane should be included in the tag and message composition, e.g. ‘<grouping>/<lane>/<prefix><build_number><postfix>’ |
prefix |
String |
FL_GIT_TAG_PREFIX |
- |
Yes | Anything you want to put in front of the version number (e.g. ‘v’) |
postfix |
String |
FL_GIT_TAG_POSTFIX |
- |
Yes | Anything you want to put at the end of the version number (e.g. ‘-RC1’) |
build_number |
String |
FL_GIT_TAG_BUILD_NUMBER |
- |
No | The build number. Defaults to the result of increment_build_number if you’re using it |
message |
String |
FL_GIT_TAG_MESSAGE |
- |
No | The tag message. Defaults to the tag’s name |
commit |
String |
FL_GIT_TAG_COMMIT |
- |
No | The commit or object where the tag will be set. Defaults to the current HEAD |
force |
Fastlane::Boolean |
FL_GIT_TAG_FORCE |
false |
No | Force adding the tag |
sign |
Fastlane::Boolean |
FL_GIT_TAG_SIGN |
false |
No | Make a GPG-signed tag, using the default e-mail address’s key |
Examples
add_git_tag # simple tag with default valuesadd_git_tag( grouping: "fastlane-builds", includes_lane: true, prefix: "v", postfix: "-RC1", build_number: 123)# Alternatively, you can specify your own tag. Note that if you do specify a tag, all other arguments are ignored.add_git_tag( tag: "my_custom_tag")Source & Upstream
- Gem Action:
add_git_tag.rb - Upstream Source: Inspect Ruby Implementation on GitHub
- Authors:
lmirosevic,maschall