forked from redis/redis
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#!/bin/sh | ||
GIT_SHA1=$( (git show-ref --head --hash=8 2> /dev/null || echo 00000000) | head -n1) | ||
GIT_DIRTY=$(git diff 2> /dev/null | wc -l) | ||
GIT_SHA1=`(git show-ref --head --hash=8 2> /dev/null || echo 00000000) | head -n1` | ||
GIT_DIRTY=`git diff 2> /dev/null | wc -l` | ||
test -f release.h || touch release.h | ||
(cat release.h | grep SHA1 | grep $GIT_SHA1) && \ | ||
(cat release.h | grep DIRTY | grep $GIT_DIRTY) && exit 0 # Already uptodate | ||
echo "#define REDIS_GIT_SHA1 \"$GIT_SHA1\"" > release.h | ||
echo "#define REDIS_GIT_DIRTY \"$GIT_DIRTY\"" >> release.h | ||
touch redis.c # force recompile of redis.c | ||
touch redis.c # Force recompile of redis.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters