File: git_revision

package info (click to toggle)
spec-alpha-clojure 0.2.176-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 268 kB
  • sloc: xml: 140; sh: 32; 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