提交 a42453a5 编写于 作者: A antirez

use git diff when generating release.h to check for dirty status

上级 9caf1a20
#!/bin/sh
GIT_SHA1=$((git show-ref --head --hash=8 2> /dev/null || echo 00000000) | head -n1)
GIT_DIRTY=$(git status -s 2> /dev/null | wc -l)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册