pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases
The current postfix conversions are: CURRENT / STABLE -> .sYYYYMMDDhhmmss ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1 BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2 RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3 PRERELEASE -> .p, so 11.3-PRERELEASE becomes 11.3.p RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1 Submitted by: rene (original version) Differential Revision: https://reviews.freebsd.org/D20734
This commit is contained in:
parent
2d1e4220eb
commit
aef769614f
@ -557,21 +557,25 @@ VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDA
|
||||
.endif
|
||||
|
||||
.if !defined(PKG_VERSION)
|
||||
.if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*}
|
||||
TIMENOW= %Y%m%d%H%M%S
|
||||
EXTRA_REVISION= .s${TIMENOW:gmtime}
|
||||
.elif ${_BRANCH:MALPHA*}
|
||||
EXTRA_REVISION= _${_BRANCH:C/-ALPHA/.a/}
|
||||
.elif ${_BRANCH:MBETA*}
|
||||
EXTRA_REVISION= _${_BRANCH:C/-BETA/.b/}
|
||||
.elif ${_BRANCH:MRC*}
|
||||
EXTRA_REVISION= _${_BRANCH:C/-RC/.r/}
|
||||
_STRTIMENOW= %Y%m%d%H%M%S
|
||||
_TIMENOW= ${_STRTIMENOW:gmtime}
|
||||
.if ${_BRANCH:MCURRENT*}
|
||||
_REVISION:= ${_REVISION:R}
|
||||
EXTRA_REVISION= .s${_TIMENOW}
|
||||
.elif ${_BRANCH:MSTABLE*}
|
||||
EXTRA_REVISION= s${_TIMENOW}
|
||||
.elif ${_BRANCH:MPRERELEASE*}
|
||||
EXTRA_REVISION= _${_BRANCH:C/-PRERELEASE/.p/}
|
||||
EXTRA_REVISION= .p
|
||||
.elif ${_BRANCH:MALPHA*}
|
||||
EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}
|
||||
.elif ${_BRANCH:MBETA*}
|
||||
EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/}
|
||||
.elif ${_BRANCH:MRC*}
|
||||
EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}
|
||||
.elif ${_BRANCH:M*-p*}
|
||||
EXTRA_REVISION= _${_BRANCH:C/.*-p([0-9]+$)/\1/}
|
||||
.endif
|
||||
PKG_VERSION:= ${_REVISION}${EXTRA_REVISION}
|
||||
PKG_VERSION:= ${_REVISION}${EXTRA_REVISION:C/[[:space:]]//g}
|
||||
.endif
|
||||
.endif # !defined(PKG_VERSION)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user