[ARVADOS-WORKBENCH2] updated: 2.1.0-388-gec46a9b5

Git user git at public.arvados.org
Thu May 20 21:26:54 UTC 2021


Summary of changes:
 version-at-commit.sh | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

       via  ec46a9b5c55b01008eda1f1475779c8f1cee9e1f (commit)
      from  0942ebd328fa1d64fb2e6b0c7cf9297693752937 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit ec46a9b5c55b01008eda1f1475779c8f1cee9e1f
Author: Ward Vandewege <ward at curii.com>
Date:   Thu May 20 17:24:18 2021 -0400

    Make sure our four digit tags are excluded from the version number
    calculation.
    
    No issue #
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/version-at-commit.sh b/version-at-commit.sh
index 89684cf2..84d7d0b4 100755
--- a/version-at-commit.sh
+++ b/version-at-commit.sh
@@ -1,4 +1,7 @@
 #!/bin/bash
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
 
 set -e -o pipefail
 commit="$1"
@@ -35,9 +38,10 @@ else
 
     if git merge-base --is-ancestor "$nearest_tag" "$merge_base" ; then
         # x.(y+1).0.devTIMESTAMP, where x.y.z is the newest version that does not contain $commit
-	# grep reads the list of tags (-f) that contain $commit and filters them out (-v)
-	# this prevents a newer tag from retroactively changing the versions of everything before it
-        v=$(git tag | grep -vFf <(git tag --contains "$commit") | sort -Vr | head -n1 | perl -pe 's/\.(\d+)\.\d+/".".($1+1).".0"/e')
+        # grep reads the list of tags (-f) that contain $commit and filters them out (-v)
+        # this prevents a newer tag from retroactively changing the versions of everything before it
+        # We also filter out four-digit faux semantic versioning tags, they gum up the works.
+        v=$(git tag | grep -vFf <(git tag --contains "$commit") |grep -v -P '\d.\d.\d.\d' | sort -Vr | head -n1 | perl -pe 's/\.(\d+)\.\d+/".".($1+1).".0"/e')
     else
         # x.y.(z+1).devTIMESTAMP, where x.y.z is the latest released ancestor of $commit
         v=$(echo $nearest_tag | perl -pe 's/(\d+)$/$1+1/e')

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list