Adjust tools/vergen for our tagging scheme

We use a `v' prefix.

* tools/vergen (version): Recognize `v'-prefixed tags.
master
Mike Gerwitz 2016-11-15 12:04:36 -05:00
parent 3433ff8d5a
commit 9669b80536
1 changed files with 8 additions and 1 deletions

View File

@ -17,6 +17,9 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# This script has been modified slightly by LoVullo Associates to support
# TAME's versioning scheme (`v'-prefixed).
##
# for distributions
@ -29,7 +32,11 @@ git rev-parse --show-toplevel >/dev/null 2>&1 || {
echo 'fatal: git repository is not available'
}
version="$( git describe --match='[0-9]\.*' --abbrev=7 HEAD 2>/dev/null )"
version=$(
git describe --match='v[0-9]\.*' --abbrev=7 HEAD 2>/dev/null \
| sed 's/^v//'
)
git update-index -q --refresh
test -z "$( git diff-index --name-only HEAD)" || version="$version-dirty"