From owner-dev-commits-src-all@freebsd.org Thu Jan 14 13:00:19 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E57524E1717; Thu, 14 Jan 2021 13:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGktq683Nz3pbv; Thu, 14 Jan 2021 13:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5B8223EC; Thu, 14 Jan 2021 13:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10ED0Jks032302; Thu, 14 Jan 2021 13:00:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10ED0JiX032299; Thu, 14 Jan 2021 13:00:19 GMT (envelope-from git) Date: Thu, 14 Jan 2021 13:00:19 GMT Message-Id: <202101141300.10ED0JiX032299@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: aef769614f92 - main - pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aef769614f921660cb0262412426034cf5395ae5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 13:00:20 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=aef769614f921660cb0262412426034cf5395ae5 commit aef769614f921660cb0262412426034cf5395ae5 Author: Emmanuel Vadot AuthorDate: 2021-01-14 12:56:38 +0000 Commit: Emmanuel Vadot CommitDate: 2021-01-14 13:00:04 +0000 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 --- Makefile.inc1 | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 5a9eff870dd5..2242ca3be5b4 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -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} +_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= .p .elif ${_BRANCH:MALPHA*} -EXTRA_REVISION= _${_BRANCH:C/-ALPHA/.a/} +EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/} .elif ${_BRANCH:MBETA*} -EXTRA_REVISION= _${_BRANCH:C/-BETA/.b/} +EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/} .elif ${_BRANCH:MRC*} -EXTRA_REVISION= _${_BRANCH:C/-RC/.r/} -.elif ${_BRANCH:MPRERELEASE*} -EXTRA_REVISION= _${_BRANCH:C/-PRERELEASE/.p/} +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)