Release used to indicate number of commits after the version tag but in case there are no commits it was set to be the version. This commit will fix it to set to 0. Signed-off-by: Roi Dayan <roid@xxxxxxxxxxxx> --- scripts/build-rpm.sh | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/scripts/build-rpm.sh b/scripts/build-rpm.sh index fbfbee8..8a00176 100755 --- a/scripts/build-rpm.sh +++ b/scripts/build-rpm.sh @@ -17,6 +17,11 @@ version=`git describe --tags --abbrev=0` # release is number of commits since the version tag release=`git describe --tags | cut -d- -f2 | tr - _` +if [ "$version" = "$release" ]; then + # no commits and release can't be empty + release=0 +fi + if [ "$branch" != "master" ]; then # if not under master branch include hash tag hash=`git rev-parse HEAD | cut -c 1-6` -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html