🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# C.27 GitDescribeTask This task finds the most recent tag that is reachable from a commit. If the tag points to the commit, then only the tag is shown. Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object and the abbreviated object name of the most recent commit. Table C.28:聽Attributes NameTypeDescriptionDefaultRequired`gitPath``String`Path to Git binary/usr/bin/gitNo`repository``String`Path to Git repositoryn/aYes`outputProperty``String`Property name to set with output value from git-describe.n/aNo`all``Boolean`Instead of using only the annotated tags, use any ref found in refs/ namespace. This option enables matching any known branch, remote-tracking branch, or lightweight tag.falseNo`tags``String`Instead of using only the annotated tags, use any tag found in refs/tags namespace. This option enables matching a lightweight (non-annotated) tag.falseNo`contains``Boolean`Instead of finding the tag that predates the commit, find the tag that comes after the commit, and thus contains it. Automatically implies --tags.falseNo`long``Boolean`Always output the long format (the tag, the number of commits and the abbreviated commit name) even when it matches a tag.falseNo`always``Boolean`Show uniquely abbreviated commit object as fallback.falseNo`abbrev``Integer`Instead of using the default 7 hexadecimal digits as the abbreviated object name, use n digits, or as many digits as needed to form a unique object name. An n of 0 will suppress long format, only showing the closest tag.n/aNo`match``String`Only consider tags matching the given glob(7) pattern, excluding the "refs/tags/" prefix. This can be used to avoid leaking private tags from the repository.n/aNo`committish``String`Commit-ish object names to describe. Defaults to HEAD if omitted.HEADNo`canditates``Integer`Instead of considering only the 10 most recent tags as candidates to describe the input commit-ish consider up to n candidates. Increasing n above 10 will take slightly longer but may produce a more accurate result. An n of 0 will cause only exact matches to be output.n/aNo C.27.1 Example ``` <gitdescribe repository="${repo.dir}" tags="true" abbrev="0" match="*-*-*.*" outputProperty="mostRecentTag" /> ```