[library-web/oscp] Append .0 to version for release notes >= 40



commit 909896b9b260a66153fb727d86577a7fc7113864
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Thu Mar 25 13:30:37 2021 +0100

    Append .0 to version for release notes >= 40
    
    This is needed to work around issues with lgo disliking "integer-only"
    versioning.

 lgo/release-notes-gen | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/lgo/release-notes-gen b/lgo/release-notes-gen
index e297b2d3..21967fcd 100755
--- a/lgo/release-notes-gen
+++ b/lgo/release-notes-gen
@@ -3,10 +3,14 @@
 REPO="https://gitlab.gnome.org/Teams/Engagement/release-notes.git";
 DIR="/data/cache/release-notes"
 
-mapfile -t branches < <(git ls-remote --heads ${REPO} | awk '{print $2}' | grep 'gnome-' | cut -d/ -f3 | 
sort -V)
+mapfile -t branches < <(git ls-remote --heads ${REPO} | awk '{print $2}' | cut -d/ -f3 | grep '^gnome-' | 
sort -V)
+
+for branch in "${branches[@]}"; do
+    VERSION="$(echo "$branch" | cut -d- -f2- | sed 's/-/./')"
+    if [[ $VERSION -ge 40 ]]; then
+        VERSION="${VERSION}.0"
+    fi
 
-for branch in ${branches[@]}; do
-    VERSION="$(echo $branch | cut -d- -f2- | sed 's/-/./')"
     TGZ="/data/extra-tarballs/release-notes-${VERSION}.tar.gz"
 
     if [[ ! -d "${DIR}-${VERSION}" ]]; then


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]