Skip to content

Commit

Permalink
update-version.sh performance improved
Browse files Browse the repository at this point in the history
  • Loading branch information
hrobeers committed Nov 4, 2013
1 parent cd40a0c commit 0a00c18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/version_autogen.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef VERSION_AUTOGEN_H
#define VERSION_AUTOGEN_H

#define BUILD_NUMBER 230
#define COMMIT_HASH "645222332ebd341a19835353dffa7324d691f6cd"
#define BUILD_NUMBER 231
#define COMMIT_HASH "cd40a0cffdbd8bb642c80c6fc06b530099fea062"

#endif // VERSION_AUTOGEN_H
4 changes: 2 additions & 2 deletions update-version.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

commitNum=$(git log --oneline | wc -l | tr -d ' ')
commitNum=$(git rev-list HEAD --count)
commitHash=$(git rev-parse --verify HEAD)

echo "// This file is auto-generated" > src/version_autogen.h
Expand All @@ -13,4 +13,4 @@ echo "" >> src/version_autogen.h
echo "#define BUILD_NUMBER $commitNum" >> src/version_autogen.h
echo "#define COMMIT_HASH \"$commitHash\"" >> src/version_autogen.h
echo "" >> src/version_autogen.h
echo "#endif // VERSION_AUTOGEN_H" >> src/version_autogen.h
echo "#endif // VERSION_AUTOGEN_H" >> src/version_autogen.h

0 comments on commit 0a00c18

Please sign in to comment.