You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by sw...@apache.org on 2024/11/28 05:25:43 UTC

(logging-log4cxx) 01/01: Fix release validation script

This is an automated email from the ASF dual-hosted git repository.

swebb2066 pushed a commit to branch improve_release_templates
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git

commit f35919a8a2da917386cf7c12ded470b179564732
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Thu Nov 28 16:25:21 2024 +1100

    Fix release validation script
---
 admin/MailTemplate.txt               |  2 +-
 admin/release-review-instructions.md |  4 ++--
 admin/validate-release.sh            | 25 +++++++++++--------------
 3 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/admin/MailTemplate.txt b/admin/MailTemplate.txt
index fb752986..ac54c520 100644
--- a/admin/MailTemplate.txt
+++ b/admin/MailTemplate.txt
@@ -7,7 +7,7 @@ Website: https://logging.staged.apache.org/log4cxx/1.3.1/changelog.html
 GitHub: https://github.com/apache/logging-log4cxx
 Commit: <todo insert>
 Distribution: https://dist.apache.org/repos/dist/dev/logging/log4cxx/
-Signing key: C6FC425C96722EFC4E2D02D5D4305EBC16B4A78D
+Signing key: 077E8893A6DCC33DD4A4D5B256E73BA9A0B592D0
 Review kit: https://github.com/apache/logging-log4cxx/blob/master/admin/release-review-instructions.md
 
 Please download, test, and cast your votes on this mailing list.
diff --git a/admin/release-review-instructions.md b/admin/release-review-instructions.md
index f25f1d03..0a361a36 100644
--- a/admin/release-review-instructions.md
+++ b/admin/release-review-instructions.md
@@ -35,5 +35,5 @@ Steps
     - `mkdir /tmp/log4cxx-github`
     - `cd /tmp/log4cxx-github`
     - `unzip "$HOME/Downloads/release_files.zip"`
-    - `diff /tmp/log4cxx{,-github}/apache-log4cxx-1.3.1.tar.gz.sha512`
-    - `diff /tmp/log4cxx{,-github}/apache-log4cxx-1.3.1.zip.sha512`
+    - `diff /tmp/log4cxx-{1.3.1,github}/apache-log4cxx-1.3.1.tar.gz.sha512`
+    - `diff /tmp/log4cxx-{1.3.1,github}/apache-log4cxx-1.3.1.zip.sha512`
diff --git a/admin/validate-release.sh b/admin/validate-release.sh
index 9971b602..30b23e86 100644
--- a/admin/validate-release.sh
+++ b/admin/validate-release.sh
@@ -18,7 +18,7 @@ if [ -z "$ARCHIVE" ] ; then
   ARCHIVE=apache-log4cxx-$VERSION
 fi
 if [ -z "$TEST_DIRECTORY" ] ; then
-  TEST_DIRECTORY=/tmp/log4cxx
+  TEST_DIRECTORY=/tmp/log4cxx-$VERSION
 fi
 
 test -d "$TEST_DIRECTORY" || mkdir "$TEST_DIRECTORY"
@@ -26,21 +26,19 @@ cd "$TEST_DIRECTORY"
 
 FULL_DL="$BASE_DL/$VERSION/$ARCHIVE"
 
-for EXT in "tar.gz" "zip" ; do
-  wget "$FULL_DL.$EXT" || exit $?
-  wget "$FULL_DL.$EXT.asc" || exit $?
+for ARCHIVE_TYPE in "tar.gz" "zip" ; do
+  test -f "$FULL_DL.$ARCHIVE_TYPE" && rm "$FULL_DL.$ARCHIVE_TYPE"
+  wget "$FULL_DL.$ARCHIVE_TYPE" || exit $?
+  for EXT in "asc" "sha512" "sha256"; do
+    test -f "$FULL_DL.$ARCHIVE_TYPE.$EXT" && rm "$FULL_DL.$ARCHIVE_TYPE.$EXT"
+    wget "$FULL_DL.$ARCHIVE_TYPE.$EXT" || exit $?
+  done
   for SUM in "sha512" "sha256"; do
-    wget "$FULL_DL.$EXT.$SUM" || exit $?
+    echo "Validating $SUM checksum..."
+    "${SUM}sum" --check  "$ARCHIVE.$ARCHIVE_TYPE.$SUM" || exit $?
   done
-done
-for SUM in "sha512" "sha256"; do
-  echo "Validating $SUM checksum..."
-  "${SUM}sum" --check  "$ARCHIVE.$EXT.$SUM" || exit $?
-done
-
-for EXT in "tar.gz" "zip" ; do
   echo "Validating signature..."
-  gpg --verify "$ARCHIVE.$EXT.asc" || exit $?
+  gpg --verify "$ARCHIVE.$ARCHIVE_TYPE.asc" || exit $?
 done
 
 if cmake --version >/dev/null  ; then
@@ -54,4 +52,3 @@ if cmake --version >/dev/null  ; then
 else
   echo "Please install cmake"
 fi
-