1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Edited getrevision.sh script and added one git hook

- git hook to automatically update revision number after
  commiting changes
This commit is contained in:
nowrep 2012-01-28 13:04:14 +01:00
parent 085a8938c0
commit 4fc30fca05
2 changed files with 8 additions and 1 deletions

5
git_hooks/post-commit Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
#
# Writes git revision into git_revision file
#
git show-ref refs/heads/master | cut -d " " -f 1 > git_revision

View File

@ -2,7 +2,9 @@
#git show-ref refs/heads/master | cut -d " " -f 1 | cut -c 1-10
cd ..
if [ -e "git_revision" ]; then
if [ -e "/usr/bin/git" ] && [ -e ".git" ]; then
git show-ref refs/heads/master | cut -d " " -f 1 | cut -c 1-10;
elif [ -e "git_revision" ]; then
cat git_revision | cut -c 1-10;
fi