File: version.sh

package info (click to toggle)
metastore 1.1.2-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 216 kB
  • sloc: ansic: 1,271; makefile: 363; sh: 74
file content (13 lines) | stat: -rwxr-xr-x 302 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

METASTORE_PRETAG_VER=v1.0.999

cd "${0%/*}" && \
METASTORE_VER="$(\
{ git describe --tags 2>/dev/null \
  || grep -no '^v[0-9][^ ]*' NEWS \
  || echo $METASTORE_PRETAG_VER; \
} | sed '/^1:/s,,,;/:/{s,[^:]*:,,;s,$,+,;};q' \
)"

echo "$METASTORE_VER_PREFIX$METASTORE_VER$METASTORE_VER_SUFFIX"