From: Tom Knot Date: Tue, 22 May 2018 14:28:27 +0000 (+0200) Subject: Updated versioning hooks X-Git-Url: http://git.graph-it.com/?a=commitdiff_plain;h=525aefdc37ee158a4bfd352de18e846b9a6f5fcc;p=graphit%2Funipi-kernel.git Updated versioning hooks --- diff --git a/.copy_over_.git/hooks/post-checkout b/.copy_over_.git/hooks/post-checkout deleted file mode 100644 index b698e8e..0000000 --- a/.copy_over_.git/hooks/post-checkout +++ /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 diff --git a/.copy_over_.git/hooks/pre-commit b/.copy_over_.git/hooks/pre-commit index 7170dd4..15d1f15 100644 --- a/.copy_over_.git/hooks/pre-commit +++ b/.copy_over_.git/hooks/pre-commit @@ -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 diff --git a/.copy_over_.git/hooks/pre-merge b/.copy_over_.git/hooks/pre-merge index 7170dd4..15d1f15 100644 --- a/.copy_over_.git/hooks/pre-merge +++ b/.copy_over_.git/hooks/pre-merge @@ -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 diff --git a/version.txt b/version.txt index b2328ce..54a8e69 100644 --- a/version.txt +++ b/version.txt @@ -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