File: pre-commit

package info (click to toggle)
pgrouting 2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 14,232 kB
  • ctags: 1,566
  • sloc: cpp: 74,626; ansic: 6,036; sql: 2,889; sh: 635; perl: 523; makefile: 67
file content (20 lines) | stat: -rwxr-xr-x 610 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
# ------------------------------------------------------------------------------
# Git Tweaks
# Copyright(c) pgRouting Contributors
#
# About:
# ------
# This script writes the current Git version into the VERSION file
# To trigger this together with every commit, run
#
#	cp tools/pre-commit .git/hooks/pre-commit
#
# Note:
# -----
# The VERSION file is always one commit behind HEAD
# ------------------------------------------------------------------------------

VERSION=`git describe --tags --long`
BRANCH=`git branch | grep '*' | awk '{print $2}'`
echo $VERSION $BRANCH > $GIT_DIR/../VERSION