Patchwork D5876: packaging: modify rc detection to work with X.Yrc instead of X.Y-rc

login
register
mail settings
Submitter phabricator
Date Feb. 7, 2019, 8:02 p.m.
Message ID <9803e894100e35f13b5e73ca9013148e@localhost.localdomain>
Download mbox | patch
Permalink /patch/38535/
State Not Applicable
Headers show

Comments

phabricator - Feb. 7, 2019, 8:02 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8f0e8b179842: packaging: modify rc detection to work with X.Yrc instead of X.Y-rc (authored by Mathias De Mare &lt;mathias.de_mare@nokia.com&gt;, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5876?vs=13885&id=13900

REVISION DETAIL
  https://phab.mercurial-scm.org/D5876

AFFECTED FILES
  contrib/packaging/packagelib.sh

CHANGE DETAILS




To: Mathiasdm, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/contrib/packaging/packagelib.sh b/contrib/packaging/packagelib.sh
--- a/contrib/packaging/packagelib.sh
+++ b/contrib/packaging/packagelib.sh
@@ -28,9 +28,9 @@ 
         distance=''
         node=''
     fi
-    if echo $hgversion | grep -- '-' > /dev/null 2>&1; then
-        version=`echo $hgversion | cut -d- -f1`
-        type=`echo $hgversion | cut -d- -f2`
+    if echo $hgversion | grep -E -- '[0-9]\.[0-9](\.[0-9])?rc' > /dev/null 2>&1; then
+        version=`echo $hgversion | cut -d'r' -f1`
+        type="rc`echo $hgversion | cut -d'c' -f2-`"
     else
         version=$hgversion
         type=''