build: do not enter 20.7.r description territory on 20.1

Due to an issue with pkg upgrade -f[1] and lack of a better approach
we will avoid version parity beween 20.1 and 20.7 development branches
by omitting 20.1 from using the RC tag for versioning.

This allows us to force an upgrade always even though the actual
version is going backwards.  It doesn't really matter then because
we seek full transition into the new packages that have been published
and not try to outsmart the upstream repo's efforts to keep everything
in sync.

[1] https://github.com/freebsd/pkg/issues/1806
This commit is contained in:
Franco Fichtner 2020-07-19 20:27:27 +02:00
parent f76cf67121
commit 84e5ec467a
1 changed files with 6 additions and 1 deletions

View File

@ -340,8 +340,13 @@ git_pull()
git_describe()
{
HEAD=${2:-"HEAD"}
VERSIONARGS="--abbrev=0 --always"
VERSION=$(git -C ${1} describe --abbrev=0 --always ${HEAD})
if [ "${PRODUCT_SETTINGS}" = "20.1" ]; then
VERSIONARGS="${VERSIONARGS} --exclude=20.7.r*"
fi
VERSION=$(git -C ${1} describe ${VERSIONARGS} ${HEAD})
REVISION=$(git -C ${1} rev-list --count ${VERSION}..${HEAD})
COMMENT=$(git -C ${1} rev-list --max-count=1 ${HEAD} | cut -c1-9)
BRANCH=$(git -C ${1} rev-parse --abbrev-ref ${HEAD})