[SCM] postgis.net branch check-md5 updated. clarity-final-95-g7f5bb5b

git at osgeo.org git at osgeo.org
Fri May 31 06:14:10 PDT 2024


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "postgis.net".

The branch, check-md5 has been updated
  discards  0a54d473edd7665393e9c9fa20c66e0bdf216bff (commit)
       via  7f5bb5bf5db66eb63eb679de9f6ccc7eac8eaa31 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (0a54d473edd7665393e9c9fa20c66e0bdf216bff)
            \
             N -- N -- N (7f5bb5bf5db66eb63eb679de9f6ccc7eac8eaa31)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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.

- Log -----------------------------------------------------------------
commit 7f5bb5bf5db66eb63eb679de9f6ccc7eac8eaa31
Author: Sandro Santilli <strk at kbt.io>
Date:   Fri May 31 14:44:13 2024 +0200

    Add md5 checker step

diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml
index 3bb9d76..4db4f3e 100644
--- a/.woodpecker/build.yml
+++ b/.woodpecker/build.yml
@@ -1,5 +1,5 @@
 when:
-  event: [push, pull_request]
+  event: [ push ]
 
 steps:
 
@@ -7,3 +7,9 @@ steps:
     image: hugomods/hugo
     commands:
       - hugo
+
+  check-md5:
+    image: ghcr.io/jqlang/jq
+    commands:
+      - apt install curl
+      - utils/check_releases_md5.sh
diff --git a/utils/check_releases_md5.sh b/utils/check_releases_md5.sh
new file mode 100755
index 0000000..339e191
--- /dev/null
+++ b/utils/check_releases_md5.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+WORKDIR=$PWD/releases-check
+API=https://git.osgeo.org/gitea/api/v1
+DOWNLOAD_BASE=https://download.osgeo.org/postgis/source
+MD5_BASE=https://postgis.net/stuff
+CONFIG=$(cd $(dirname $0)/../; pwd)/config.json
+
+mkdir -p ${WORKDIR}
+cd ${WORKDIR}
+
+echo "Fetching list of published releases"
+jq -r '.params.postgis.releases[] | select( .is_dev != true ) | .tag' \
+  ${CONFIG} > checked_releases.txt
+
+while read REL; do
+  relname=postgis-${REL}.tar.gz
+  md5name=${relname}.md5
+
+  echo -n "Checking ${relname} ... "
+  curl -s ${DOWNLOAD_BASE}/${relname} -o ${relname} || {
+    echo "unable to download ${relname} from ${DOWNLOAD_BASE}"
+    exit 1
+  }
+  curl -s ${MD5_BASE}/${md5name} -o ${md5name} || {
+    echo "unable to download ${md5name} from ${MD5_BASE}"
+    exit 1
+  }
+  md5sum ${relname} | diff - ${md5name} > /dev/null 2>&1 || {
+    echo "MD5 mismatch"
+    exit 1
+  }
+  echo "OK"
+done < checked_releases.txt

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

Summary of changes:
 .woodpecker/build.yml | 1 -
 1 file changed, 1 deletion(-)


hooks/post-receive
-- 
postgis.net


More information about the postgis-tickets mailing list