[library-web/oscp] Handle the new versioning scheme and work around symlink replacement bug



commit 445aafaf1e63cdccc6b158543332392daeb90e6d
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Thu Mar 25 13:46:13 2021 +0100

    Handle the new versioning scheme and work around symlink replacement bug

 lgo/entrypoint.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/lgo/entrypoint.sh b/lgo/entrypoint.sh
index 07c3f8f6..4123056b 100755
--- a/lgo/entrypoint.sh
+++ b/lgo/entrypoint.sh
@@ -12,7 +12,12 @@ DATE="$(date +%s)"
 
 cd /data/output/help.gnome.org/misc/release-notes || exit
 REPO="https://gitlab.gnome.org/Teams/Engagement/release-notes.git";
-LATEST_RELEASE="$(git ls-remote --heads ${REPO} | awk '{print $2}' | grep 'gnome-' | cut -d/ -f3 | cut -d- 
-f2- | sort -V | tail -n1 | sed 's/-/./')"
+LATEST_RELEASE="$(git ls-remote --heads ${REPO} | awk '{print $2}' | cut -d/ -f3 | grep '^gnome-' | sort -V 
| tail -n1 | cut -d- -f2- | sed 's/-/./')"
+if [[ $LATEST_RELEASE -ge 40 ]]; then
+  LATEST_RELEASE="${LATEST_RELEASE}.0"
+fi
+
+rm -f stable
 ln -sf "${LATEST_RELEASE}" stable
 
 cd /data/logs || exit


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