pkg: compute CORE_NEXT to do automated tag matching
If CORE_NEXT.b tag exists do not use anything else anymore, otherwise if CORE_NEXT* something exists use this, otherwise hands off from manual tag pattern matching. Since this is based on computation of CORE_ABI input we can use this on the development track to always figure out the correct version to use without checking the CORE_ABI explicitly. Use CORE_NEXT in a file replacement as well.
This commit is contained in:
parent
ae7bbbacee
commit
3dcc9f512e
26
Makefile
26
Makefile
|
@ -32,13 +32,25 @@ CORE_ABI?= 21.1
|
|||
CORE_PHP?= 73
|
||||
CORE_PYTHON?= 37
|
||||
|
||||
.if exists(${GIT}) && exists(${GITVERSION})
|
||||
. if ${CORE_ABI} == "21.1"
|
||||
CORE_COMMIT!= ${GITVERSION} --match=21.7\*
|
||||
. elif ${CORE_ABI} == "20.7"
|
||||
CORE_COMMIT!= ${GITVERSION} --match=21.1.b
|
||||
. else
|
||||
CORE_COMMIT!= ${GITVERSION}
|
||||
_CORE_NEXT= ${CORE_ABI:C/\./ /}
|
||||
.if ${_CORE_NEXT:[2]} == 7
|
||||
CORE_NEXT!= expr ${_CORE_NEXT:[1]} + 1
|
||||
CORE_NEXT:= ${CORE_NEXT}.1
|
||||
.else
|
||||
CORE_NEXT= ${_CORE_NEXT:[1]}
|
||||
CORE_NEXT:= ${CORE_NEXT}.7
|
||||
.endif
|
||||
|
||||
.if exists(${GIT})
|
||||
. if exists(${GITVERSION})
|
||||
_NEXTBETA!= ${GIT} tag -l ${CORE_NEXT}.b
|
||||
_NEXTDEVEL!= ${GIT} tag -l ${CORE_NEXT}\*
|
||||
. if !empty(_NEXTBETA)
|
||||
_NEXTMATCH= --match=${CORE_NEXT}.b
|
||||
. elif !empt(_NEXTDEVEL)
|
||||
_NEXTMATCH= --match=${CORE_NEXT}\*
|
||||
. endif
|
||||
CORE_COMMIT!= ${GITVERSION} ${_NEXTMATCH}
|
||||
. endif
|
||||
.else
|
||||
CORE_COMMIT= unknown 0 undefined
|
||||
|
|
|
@ -85,6 +85,7 @@ REPLACEMENTS= CORE_ABI \
|
|||
CORE_HASH \
|
||||
CORE_MAINTAINER \
|
||||
CORE_NAME \
|
||||
CORE_NEXT \
|
||||
CORE_PACKAGESITE \
|
||||
CORE_PKGVERSION \
|
||||
CORE_PRODUCT \
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
s" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" logo+
|
||||
s" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ " logo+
|
||||
s" #[m " logo+
|
||||
s" 21.7 ``The Road Ahead'' #[m" logo+
|
||||
s" %%CORE_NEXT%% ``The Road Ahead'' #[m" logo+
|
||||
|
||||
2drop
|
||||
;
|
Loading…
Reference in New Issue