C.24 GitTagTask
Prev | Appendix C. Optional tasks | Next

## C.24 GitTagTask

Create, list, delete or verify a tag object signed with GPG. See official documentation.

Table C.25: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`gitPath` | `String` | Path to Git binary | /usr/bin/git | No
`repository` | `String` | Path to Git repository | n/a | Yes
`message` | `String` | Use given tag message. See -m of git-tag | n/a | No
`name` | `String` | Tag name | n/a | Yes
`commit` | `String` | <commit> argument to git-tag | n/a | No
`object` | `String` | <object> argument to git-tag | n/a | No
`pattern` | `String` | <pattern> argument to git-tag | n/a | No
`outputProperty` | `String` | Property name to set with output value from git-tag | n/a | No
`file` | `String` | Take tag message from given file. See -F of git-tag | n/a | No
`annotate` | `Boolean` | Make unsigned, annotated tag object. See -a of git-tag | `false` | No
`force` | `Boolean` | Replace existing tag with given name. See -f of git-tag | `false` | No
`delete` | `Boolean` | Delete existing tags with given names. See -d of git-tag | `false` | No
`list` | `Boolean` | List tags with names matching given pattern. See -l of git-tag | `false` | No
`num` | `Integer` | Specifies how many lines from the annotation, if any, are printed when using -l. See -n of git-tag | n/a | No
`contains` | `String` | Only list tags containing specified commit. See --contains of git-tag | n/a | No
`sign` | `Boolean` | Make GPG-signed tag. See -s of git-tag | `false` | No
`keySign` | `String` | Make GPG-signed tag, using given key. See -u of git-tag of git-tag | n/a | No
`verify` | `Boolean` | Verify GPG signature of given tag names. See -v of git-tag | `false` | No

### C.24.1 Example

    <property name="repo.dir" value="./relative/path/to/repo" />
    <resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />

    <!-- clone repository -->
    <gitclone
        repository="git://github.com/path/to/repo/repo.git"
        targetPath="${repo.dir.resolved}" />

    <gittag repository="${repo.dir.resolved}" name="ver1.0" />
    <!-- Force duplicate tag creation -->
    <gittag
        repository="${repo.dir.resolved}"
        name="ver1.0" force="true"/>
    <!-- Create tag with annotation and message -->
    <gittag
        repository="${repo.dir.resolved}"
        name="ver1.0"
        annotate="true" message="Version 1.0 tag"/>
    <!-- Delete tag -->
    <gittag
        repository="${repo.dir.resolved}"
            name="ver2.0" delete="true" />
    <!-- List tags matching to pattern "marked" into "tags" variable -->
    <gittag repository="${repo.dir.resolved}"
        list="true"
        outputProperty="tags"
        pattern="marked" />

Prev | Up | Next
C.23 GitPushTask | Home | C.25 GitLogTask