Fix finding ChangeLog when building
Keep the first optional argument of get_version.sh as "--strict" and make the second the PROJECT_SOURCE_DIR plus trailing slash from CMakeLists.txt
This commit is contained in:
@@ -33,10 +33,10 @@ then
|
||||
fi
|
||||
VERSION=$(git describe --exact-match 2>/dev/null || echo "$MAJOR-git$(git show -s --pretty=format:%ci | cut -d ' ' -f 1 | tr -d '-').$(git show -s --pretty=format:%h)")$DIRTY
|
||||
else
|
||||
VERSION=$( (head -n 1 ChangeLog || head -n 1 ../ChangeLog) | cut -d ' ' -f 2)
|
||||
VERSION=$(head -n 1 ${2}ChangeLog | cut -d ' ' -f 2)
|
||||
if [ $VERSION = "master" ]
|
||||
then
|
||||
VERSION=$VERSION-$( (head -n 1 ChangeLog || head -n 1 ../ChangeLog) | cut -d ' ' -f 1)
|
||||
VERSION=$VERSION-$(head -n 1 ${2}ChangeLog | cut -d ' ' -f 1)
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user