summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dechesne <nicolas.dechesne@linaro.org>2017-04-20 14:32:32 +0200
committerNicolas Dechesne <nicolas.dechesne@linaro.org>2017-04-20 18:58:33 +0200
commiteca6a40176cfa3fd5f019025ae2ceefe085dba26 (patch)
tree805a9e032822715cdbe00c9409b98c3016fe37af
parentb7f8b94203a39304215e546543d8d451fda02458 (diff)
downloadlci-build-tools-eca6a40176cfa3fd5f019025ae2ceefe085dba26.tar.gz
jenkins_kernel_build_inst: improve Debian kernel package version
So far the kernel package version string is set to <kernel-release>-1 (the -1 is coming from the kernel .version file and is meaningless for us). When kernel is at 'rc' level, the version go backward when going from 4.x.0-rc8 to 4.x.0 for example, so first we fix this issue by replace the '-' with '~' in the version string. Then we add -$BUILD_NUMBER so that the kernel package version is linked to our CI build numbers, which is a meaningful information for our users. We need to move the if statement slightly earlier to make sure that BUILD_NUMBER is set when building outside of CI, since we use variable now. Change-Id: I65c09262376dc31e3c0d385ece0254edde1f9732 Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
-rwxr-xr-xjenkins_kernel_build_inst14
1 files changed, 9 insertions, 5 deletions
diff --git a/jenkins_kernel_build_inst b/jenkins_kernel_build_inst
index a8afff0..110f24f 100755
--- a/jenkins_kernel_build_inst
+++ b/jenkins_kernel_build_inst
@@ -130,22 +130,26 @@ if $git_reset = "true" ; then
git reset --hard
fi
+if [ -z "${WORKSPACE}" ]; then
+ # Local build
+ export WORKSPACE=`pwd`
+ export BUILD_NUMBER=1
+fi
+
export kernel_version=`make kernelversion`
export kernel_release=${kernel_version}-linaro-${kernel_flavour}
+# deb_pkg_version should increment from 4.x.0-rcy to 4.x.0
+export kernel_deb_pkg_version=$(echo ${kernel_release} | sed -e 's/\.0-rc/\.0~rc/')
export KERNELVERSION=${kernel_version}
export KERNELRELEASE=${kernel_release}
export KDEB_SOURCENAME=linux-${kernel_release}
export KDEB_PERFNAME=perf-${kernel_release}
+export KDEB_PKGVERSION=${kernel_deb_pkg_version}-${BUILD_NUMBER}
# Below is the list of values that will be used in the json files
export KERNEL_GIT=`git config remote.origin.url`
export KERNEL_COMMIT=`git log -n1 --pretty=format:%H`
-if [ -z "${WORKSPACE}" ]; then
- # Local build
- export WORKSPACE=`pwd`
- export BUILD_NUMBER=1
-fi
. $WORKSPACE/lci-build-tools/jenkins_common_lib
#Calling the function build_instructions which includes the kernel build instructions