aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcmake/Modules/Packager.cmake12
-rw-r--r--scripts/build-packages.sh1
2 files changed, 8 insertions, 5 deletions
diff --git a/cmake/Modules/Packager.cmake b/cmake/Modules/Packager.cmake
index 8f7ba4264..9a64488e4 100755
--- a/cmake/Modules/Packager.cmake
+++ b/cmake/Modules/Packager.cmake
@@ -51,19 +51,21 @@ macro(make_packages)
list(GET VER 1 commit_num)
list(GET VER 2 commit_name)
- if (NOT ENV{BUILD_NUMBER})
+ if ($ENV{BUILD_NUMBER} STREQUAL "")
set(bld "b1")
else()
set(bld "b$ENV{BUILD_NUMBER}")
endif()
+ message("Build number is: ${bld}")
+
#define DEB and RPM version numbers
if(${commit_num} EQUAL 0)
set(deb_ver "${tag}")
set(rpm_ver "${tag}")
else()
- set(deb_ver "${tag}-${commit_num}-${commit_name}~${bld}")
- set(rpm_ver "${tag}-${commit_num}_${commit_name}~${bld}")
+ set(deb_ver "${tag}-${commit_num}-release")
+ set(rpm_ver "${tag}-${commit_num}-release")
endif()
get_cmake_property(components COMPONENTS)
@@ -81,7 +83,7 @@ macro(make_packages)
set(CPACK_PACKAGE_VERSION "${deb_ver}")
foreach(lc ${components})
string(TOUPPER ${lc} uc)
- set(CPACK_${type}_${uc}_FILE_NAME "${lc}_${tag}-${commit_num}-release_${arch}.deb")
+ set(CPACK_${type}_${uc}_FILE_NAME "${lc}_${deb_ver}_${arch}.deb")
set(DEB_DEPS)
if (NOT ${${lc}_DEB_DEPENDENCIES} STREQUAL "")
@@ -121,7 +123,7 @@ macro(make_packages)
endif()
set(CPACK_RPM_${uc}_PACKAGE_NAME "${package_name}")
- set(CPACK_${type}_${uc}_FILE_NAME "${package_name}-${tag}-${commit_num}-release.${arch}.rpm")
+ set(CPACK_${type}_${uc}_FILE_NAME "${package_name}-${rpm_ver}.${arch}.rpm")
endforeach()
endif()
diff --git a/scripts/build-packages.sh b/scripts/build-packages.sh
index 6101e93fa..b199f99e8 100644
--- a/scripts/build-packages.sh
+++ b/scripts/build-packages.sh
@@ -56,6 +56,7 @@ setup_fdio_repo() {
curl -s ${PACKAGECLOUD_RELEASE_REPO_RPM} | sudo bash
curl ${LATEST_EPEL_REPO} > epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm || true
+ rm epel-release-latest-7.noarch.rpm
else
echo "Distribution ${DISTRIB_ID} is not supported"
exit -1