mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Get the SHA1 when no tag is present
The 'git describe' command finds the most recent tag instead of the SHA1. When trying to build from a repository without any tags, for example in a fork, this causes the build to fail. Use the '--always' option to fallback to the SHA1 in case no tag is present. Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
This commit is contained in:
parent
e26dd30165
commit
19dd25c71c
1 changed files with 1 additions and 1 deletions
|
@ -177,7 +177,7 @@ if [ "$MXEBUILDTYPE" = "x86_64-w64-mingw32.shared" ] ; then
|
|||
fi
|
||||
|
||||
cd "$BUILDDIR"
|
||||
CURRENT_SHA=$(cd "$BASEDIR"/subsurface/libdivecomputer ; git describe)
|
||||
CURRENT_SHA=$(cd "$BASEDIR"/subsurface/libdivecomputer ; git describe --always --long)
|
||||
PREVIOUS_SHA=$(cat "libdivecomputer.SHA" 2>/dev/null || echo)
|
||||
if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] || [ ! -d libdivecomputer ] || [ -f build.libdivecomputer ] ; then
|
||||
rm -f build.libdivecomputer
|
||||
|
|
Loading…
Reference in a new issue