functions: add dirty fall back to commit id if no version tag can be found
This commit is contained in:
parent
131be5e113
commit
2cf52365f1
@ -21,8 +21,13 @@ function build_git_repo()
|
|||||||
VERSION=$(newest_git_tag)
|
VERSION=$(newest_git_tag)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git verify-tag "$VERSION"
|
if [ -n "$VERSION" ] ; then
|
||||||
git checkout "$VERSION"
|
git verify-tag "$VERSION"
|
||||||
|
git checkout "$VERSION"
|
||||||
|
else
|
||||||
|
LAST_COMMIT_ID=$(git log --pretty="format:%h" -n1)
|
||||||
|
VERSION="0.1+git$LAST_COMMIT_ID"
|
||||||
|
fi
|
||||||
mv ../debian/ .
|
mv ../debian/ .
|
||||||
VERSION_CHANGELOG=$( echo $VERSION | sed -e 's/v//g')
|
VERSION_CHANGELOG=$( echo $VERSION | sed -e 's/v//g')
|
||||||
sed -e "s/NAME_PLACEHOLDER/$NAME/g" -i ./debian/changelog
|
sed -e "s/NAME_PLACEHOLDER/$NAME/g" -i ./debian/changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user