Updated versioning hooks
authorTom Knot <tomasknot@gmail.com>
Tue, 22 May 2018 14:28:27 +0000 (16:28 +0200)
committerTom Knot <tomasknot@gmail.com>
Tue, 22 May 2018 14:28:27 +0000 (16:28 +0200)
.copy_over_.git/hooks/post-checkout [deleted file]
.copy_over_.git/hooks/pre-commit
.copy_over_.git/hooks/pre-merge
version.txt

diff --git a/.copy_over_.git/hooks/post-checkout b/.copy_over_.git/hooks/post-checkout
deleted file mode 100644 (file)
index b698e8e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-FILENAME='version.txt'
-
-exec 1>&2
-REPONAME=`basename \`git rev-parse --show-toplevel\``
-BRANCH=`git rev-parse --abbrev-ref HEAD`
-SHORTHASH=`git log --pretty=format:'%h' -n 1`
-REVCOUNT=`git log --oneline | wc -l`
-LATESTTAG=`git describe --tags --abbrev=0`
-
-VERSION="Repository:$REPONAME ActiveBranch:[$BRANCH] `if [ -n \"$LATESTTAG\" ]; then echo \"PrecedingRelease:$LATESTTAG\"; fi` PrecedingRevision:$REVCOUNT($SHORTHASH)"
-echo $VERSION > $FILENAME
-git update-index --assume-unchanged $FILENAME
\ No newline at end of file
index 7170dd4cefb2302ef38fe422a39f9d6001c9f71d..15d1f15d37978f4d34e770e856b227962e5b74db 100644 (file)
@@ -7,9 +7,10 @@ REPONAME=`basename \`git rev-parse --show-toplevel\``
 BRANCH=`git rev-parse --abbrev-ref HEAD`
 SHORTHASH=`git log --pretty=format:'%h' -n 1`
 REVCOUNT=`git log --oneline | wc -l`
+CURRENTTIME=`date`
 LATESTTAG=`git describe --tags --abbrev=0`
 
-VERSION="Repository:$REPONAME ActiveBranch:[$BRANCH] `if [ -n \"$LATESTTAG\" ]; then echo \"PrecedingRelease:$LATESTTAG\"; fi` PrecedingRevision:$REVCOUNT($SHORTHASH)"
+VERSION="Repository:$REPONAME ActiveBranch:[$BRANCH] `if [ -n \"$LATESTTAG\" ]; then echo \"PrecedingRelease:$LATESTTAG\"; fi` PrecedingRevision:$REVCOUNT($SHORTHASH) LatestCommit:$CURRENTTIME"
 echo $VERSION > $FILENAME
 git update-index --no-assume-unchanged $FILENAME
 git add $FILENAME
\ No newline at end of file
index 7170dd4cefb2302ef38fe422a39f9d6001c9f71d..15d1f15d37978f4d34e770e856b227962e5b74db 100644 (file)
@@ -7,9 +7,10 @@ REPONAME=`basename \`git rev-parse --show-toplevel\``
 BRANCH=`git rev-parse --abbrev-ref HEAD`
 SHORTHASH=`git log --pretty=format:'%h' -n 1`
 REVCOUNT=`git log --oneline | wc -l`
+CURRENTTIME=`date`
 LATESTTAG=`git describe --tags --abbrev=0`
 
-VERSION="Repository:$REPONAME ActiveBranch:[$BRANCH] `if [ -n \"$LATESTTAG\" ]; then echo \"PrecedingRelease:$LATESTTAG\"; fi` PrecedingRevision:$REVCOUNT($SHORTHASH)"
+VERSION="Repository:$REPONAME ActiveBranch:[$BRANCH] `if [ -n \"$LATESTTAG\" ]; then echo \"PrecedingRelease:$LATESTTAG\"; fi` PrecedingRevision:$REVCOUNT($SHORTHASH) LatestCommit:$CURRENTTIME"
 echo $VERSION > $FILENAME
 git update-index --no-assume-unchanged $FILENAME
 git add $FILENAME
\ No newline at end of file
index b2328cef841a7fd147e537da277a8b586f01debb..54a8e69d6883744dc9bba635385b24248d15339e 100644 (file)
@@ -1 +1 @@
-Repository:neuron-kernel ActiveBranch:[master] PrecedingRevision:34(6ef8ca8)
+Repository:neuron-kernel ActiveBranch:[master] PrecedingRevision:35(f15308f) LatestCommit:Tue May 22 16:28:28 CEST 2018