summaryrefslogtreecommitdiffstats
path: root/utils/releasetools
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:40:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:40:54 +0000
commit317c0644ccf108aa23ef3fd8358bd66c2840bfc0 (patch)
treec417b3d25c86b775989cb5ac042f37611b626c8a /utils/releasetools
parentInitial commit. (diff)
downloadredis-317c0644ccf108aa23ef3fd8358bd66c2840bfc0.tar.xz
redis-317c0644ccf108aa23ef3fd8358bd66c2840bfc0.zip
Adding upstream version 5:7.2.4.upstream/5%7.2.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'utils/releasetools')
-rwxr-xr-xutils/releasetools/01_create_tarball.sh14
-rwxr-xr-xutils/releasetools/02_upload_tarball.sh23
-rwxr-xr-xutils/releasetools/03_test_release.sh28
-rwxr-xr-xutils/releasetools/04_release_hash.sh13
-rwxr-xr-xutils/releasetools/changelog.tcl35
5 files changed, 113 insertions, 0 deletions
diff --git a/utils/releasetools/01_create_tarball.sh b/utils/releasetools/01_create_tarball.sh
new file mode 100755
index 0000000..366a61e
--- /dev/null
+++ b/utils/releasetools/01_create_tarball.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+if [ $# != "1" ]
+then
+ echo "Usage: ./utils/releasetools/01_create_tarball.sh <version_tag>"
+ exit 1
+fi
+
+TAG=$1
+TARNAME="redis-${TAG}.tar"
+echo "Generating /tmp/${TARNAME}"
+git archive $TAG --prefix redis-${TAG}/ > /tmp/$TARNAME || exit 1
+echo "Gizipping the archive"
+rm -f /tmp/$TARNAME.gz
+gzip -9 /tmp/$TARNAME
diff --git a/utils/releasetools/02_upload_tarball.sh b/utils/releasetools/02_upload_tarball.sh
new file mode 100755
index 0000000..ef1e777
--- /dev/null
+++ b/utils/releasetools/02_upload_tarball.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+if [ $# != "1" ]
+then
+ echo "Usage: ./utils/releasetools/02_upload_tarball.sh <version_tag>"
+ exit 1
+fi
+
+echo "Uploading..."
+scp /tmp/redis-${1}.tar.gz ubuntu@host.redis.io:/var/www/download/releases/
+echo "Updating web site... "
+echo "Please check the github action tests for the release."
+echo "Press any key if it is a stable release, or Ctrl+C to abort"
+read x
+ssh ubuntu@host.redis.io "cd /var/www/download;
+ rm -rf redis-${1}.tar.gz;
+ wget http://download.redis.io/releases/redis-${1}.tar.gz;
+ tar xvzf redis-${1}.tar.gz;
+ rm -rf redis-stable;
+ mv redis-${1} redis-stable;
+ tar cvzf redis-stable.tar.gz redis-stable;
+ rm -rf redis-${1}.tar.gz;
+ shasum -a 256 redis-stable.tar.gz > redis-stable.tar.gz.SHA256SUM;
+ "
diff --git a/utils/releasetools/03_test_release.sh b/utils/releasetools/03_test_release.sh
new file mode 100755
index 0000000..493d0b7
--- /dev/null
+++ b/utils/releasetools/03_test_release.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+set -e
+if [ $# != "1" ]
+then
+ echo "Usage: ./utils/releasetools/03_test_release.sh <version_tag>"
+ exit 1
+fi
+
+TAG=$1
+TARNAME="redis-${TAG}.tar.gz"
+DOWNLOADURL="http://download.redis.io/releases/${TARNAME}"
+
+echo "Doing sanity test on the actual tarball"
+
+cd /tmp
+rm -rf test_release_tmp_dir
+mkdir test_release_tmp_dir
+cd test_release_tmp_dir
+rm -f $TARNAME
+rm -rf redis-${TAG}
+wget $DOWNLOADURL
+tar xvzf $TARNAME
+cd redis-${TAG}
+make
+./runtest
+./runtest-sentinel
+./runtest-cluster
+./runtest-moduleapi
diff --git a/utils/releasetools/04_release_hash.sh b/utils/releasetools/04_release_hash.sh
new file mode 100755
index 0000000..d932928
--- /dev/null
+++ b/utils/releasetools/04_release_hash.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+if [ $# != "1" ]
+then
+ echo "Usage: ./utils/releasetools/04_release_hash.sh <version_tag>"
+ exit 1
+fi
+
+SHA=$(curl -s http://download.redis.io/releases/redis-${1}.tar.gz | shasum -a 256 | cut -f 1 -d' ')
+ENTRY="hash redis-${1}.tar.gz sha256 $SHA http://download.redis.io/releases/redis-${1}.tar.gz"
+echo $ENTRY >> ../redis-hashes/README
+echo "Press any key to commit, Ctrl-C to abort)."
+read yes
+(cd ../redis-hashes; git commit -a -m "${1} hash."; git push)
diff --git a/utils/releasetools/changelog.tcl b/utils/releasetools/changelog.tcl
new file mode 100755
index 0000000..2288794
--- /dev/null
+++ b/utils/releasetools/changelog.tcl
@@ -0,0 +1,35 @@
+#!/usr/bin/env tclsh
+
+if {[llength $::argv] != 2 && [llength $::argv] != 3} {
+ puts "Usage: $::argv0 <branch> <version> \[<num-commits>\]"
+ exit 1
+}
+
+set branch [lindex $::argv 0]
+set ver [lindex $::argv 1]
+if {[llength $::argv] == 3} {
+ set count [lindex ::$argv 2]
+} else {
+ set count 100
+}
+
+set template {
+================================================================================
+Redis %ver% Released %date%
+================================================================================
+
+Upgrade urgency <URGENCY>: <DESCRIPTION>
+}
+
+set template [string trim $template]
+append template "\n\n"
+set date [clock format [clock seconds]]
+set template [string map [list %ver% $ver %date% $date] $template]
+
+append template [exec git log $branch~$count..$branch "--format=format:%an in commit %h:%n %s" --shortstat]
+
+#Older, more verbose version.
+#
+#append template [exec git log $branch~30..$branch "--format=format:+-------------------------------------------------------------------------------%n| %s%n| By %an, %ai%n+--------------------------------------------------------------------------------%nhttps://github.com/redis/redis/commit/%H%n%n%b" --stat]
+
+puts $template