[build] Customise fuel pkg revision
Allow to change fuel package revision from CI side Related-Bug: #1651771 Change-Id: I10e158256e8c0f7cd32f74ba05bfdb1cf376a83a
This commit is contained in:
parent
e2c50bee51
commit
7915c0ae25
|
@ -44,10 +44,14 @@ main () {
|
|||
# Get revision number as commit count for src+spec projects
|
||||
local _rev=`git -C $_srcpath rev-list --no-merges origin/${SOURCE_BRANCH} | wc -l`
|
||||
[ "$GERRIT_CHANGE_STATUS" == "NEW" ] && _rev=$(( $_rev + 1 ))
|
||||
local release="1~u14.04+mos${_rev}"
|
||||
# if gitshasrc is not defined (we are not using fetch_upstream), let's do it
|
||||
[ -n "${gitshasrc}" ] || local gitshasrc=$(git -C $_srcpath log -1 --pretty="%h")
|
||||
[ "$GERRIT_CHANGE_STATUS" == "NEW" ] && release="${release}+git.${gitshasrc}"
|
||||
if [ "$GERRIT_CHANGE_STATUS" == "NEW" ] ; then
|
||||
local OVERRIDE_PKG_REVISION=${OVERRIDE_PKG_REVISION:-1}
|
||||
local release="${OVERRIDE_PKG_REVISION}~u14.04+mos${_rev}+git.${gitshasrc}"
|
||||
else
|
||||
local release="1~u14.04+mos${_rev}"
|
||||
fi
|
||||
local fullver=${version}-${release}
|
||||
# Update version and changelog
|
||||
local firstline=1
|
||||
|
|
|
@ -41,8 +41,12 @@ main () {
|
|||
# if gitshasrc is not defined (we are not using fetch_upstream), let's do it
|
||||
[ -n "${gitshasrc}" ] || local gitshasrc=$(git -C $_srcpath log -1 --pretty="%h")
|
||||
[ "$GERRIT_CHANGE_STATUS" == "NEW" ] && _rev=$(( $_rev + 1 ))
|
||||
local release="1.mos${_rev}"
|
||||
[ "$GERRIT_CHANGE_STATUS" == "NEW" ] && release="${release}.git.${gitshasrc}"
|
||||
if [ "$GERRIT_CHANGE_STATUS" == "NEW" ] ; then
|
||||
local OVERRIDE_PKG_REVISION=${OVERRIDE_PKG_REVISION:-1}
|
||||
local release="${OVERRIDE_PKG_REVISION}.mos${_rev}.git.${gitshasrc}"
|
||||
else
|
||||
local release="1.mos${_rev}"
|
||||
fi
|
||||
local TAR_NAME=${PACKAGENAME}-${version}.tar.gz
|
||||
# Update version and changelog
|
||||
sed -i "s|Version:.*$|Version: ${version}|" $specfile
|
||||
|
|
Loading…
Reference in New Issue