File: trunk_revision

package info (click to toggle)
spec-alpha-clojure 0.5.238-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 328 kB
  • sloc: xml: 146; sh: 41; makefile: 5
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