File: trunk_revision

package info (click to toggle)
tools-deps-alpha-clojure 0.12.1003-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 512 kB
  • sloc: xml: 153; sh: 68; makefile: 12
file content (14 lines) | stat: -rwxr-xr-x 390 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash

# Returns the number of commits made since the v0.0 tag

set -e

REVISION=`git --no-replace-objects describe --match v0.0`

# Extract the version number from the string. Do this in two steps so
# it is a little easier to understand.
REVISION=${REVISION:5} # drop the first 5 characters
REVISION=${REVISION:0:${#REVISION}-9} # drop the last 9 characters

echo $REVISION