File: 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 (19 lines) | stat: -rwxr-xr-x 457 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

# Return the complete revision number
# <major>.<minor>.<trunk-basis>.<patch-or-0>-<sha>[-qualifier]

set -e

version_template=`cat VERSION_TEMPLATE`

if [[ "$version_template" =~ ^[0-9]+\.[0-9]+\.GENERATED_VERSION(-[a-zA-Z0-9]+)?$ ]]; then

    git_revision=`script/build/git_revision`
    echo ${version_template/GENERATED_VERSION/$git_revision}

else
    echo "Invalid version template string: $version_template" >&2
    exit -1
fi