File: git_revision

package info (click to toggle)
core-specs-alpha-clojure 0.2.44-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 164 kB
  • sloc: xml: 120; sh: 30; makefile: 3
file content (13 lines) | stat: -rwxr-xr-x 257 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash

# Return the portion of the version number generated from git
# <trunk-basis>

set -e

trunk_basis=`script/build/trunk_revision`
sha=`git rev-parse HEAD`

sha=${sha:0:${#sha}-34} # drop the last 34 characters, keep 6

echo $trunk_basis