ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# C.26 GitTagTask Create, list, delete or verify a tag object signed with GPG. See official [documentation](http://www.kernel.org/pub/software/scm/git/docs/git-tag.html). Table C.27:聽Attributes NameTypeDescriptionDefaultRequired`gitPath``String`Path to Git binary/usr/bin/gitNo`repository``String`Path to Git repositoryn/aYes`message``String`Use given tag message. See -m of [git-tag](http://www.kernel.org/pub/software/scm/git/docs/git-tag.html) n/aNo`name``String`Tag namen/aYes`commit``String`<commit> argument to git-tagn/aNo`object``String`<object> argument to git-tagn/aNo`pattern``String`<pattern> argument to git-tagn/aNo`outputProperty``String`Property name to set with output value from git-tagn/aNo`file``String`Take tag message from given file. See -F of [git-tag](http://www.kernel.org/pub/software/scm/git/docs/git-tag.html) n/aNo`annotate``Boolean`Make unsigned, annotated tag object. See -a of [git-tag](http://www.kernel.org/pub/software/scm/git/docs/git-tag.html) `false`No`force``Boolean`Replace existing tag with given name. See -f of [git-tag](http://www.kernel.org/pub/software/scm/git/docs/git-tag.html) `false`No`delete``Boolean`Delete existing tags with given names. See -d of [git-tag](http://www.kernel.org/pub/software/scm/git/docs/git-tag.html) `false`No`list``Boolean`List tags with names matching given pattern. See -l of [git-tag](http://www.kernel.org/pub/software/scm/git/docs/git-tag.html) `false`No`num``Integer`Specifies how many lines from the annotation, if any, are printed when using -l. See -n of [git-tag](http://www.kernel.org/pub/software/scm/git/docs/git-tag.html) n/aNo`contains``String`Only list tags containing specified commit. See --contains of [git-tag](http://www.kernel.org/pub/software/scm/git/docs/git-tag.html) n/aNo`sign``Boolean`Make GPG-signed tag. See -s of [git-tag](http://www.kernel.org/pub/software/scm/git/docs/git-tag.html) `false`No`keySign``String`Make GPG-signed tag, using given key. See -u of git-tag of [git-tag](http://www.kernel.org/pub/software/scm/git/docs/git-tag.html) n/aNo`verify``Boolean`Verify GPG signature of given tag names. See -v of [git-tag](http://www.kernel.org/pub/software/scm/git/docs/git-tag.html) `false`No C.26.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" /> ```