mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
use git diff when generating release.h to check for dirty status
This commit is contained in:
parent
9caf1a2043
commit
a42453a593
@ -1,6 +1,6 @@
|
||||
#!/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
|
||||
|
Loading…
Reference in New Issue
Block a user