File: trunk_revision

package info (click to toggle)
core-async-clojure 1.3.610-5%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 648 kB
  • sloc: xml: 170; sh: 41; makefile: 20
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