summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2018-12-24 23:56:51 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2018-12-24 23:56:51 (EST)
commit3e67f0492b7bfd7e86778fe159028da154f1364d (patch)
tree3cd4a42ec0bc362b9a5d899926a44d2be5f3d588 /scripts
parent21f2b9be37f4badc1919fd77456cc160fb692653 (diff)
scripts/announce-release.sh: New file
Copied from pro-archman.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/announce-release.sh90
1 files changed, 90 insertions, 0 deletions
diff --git a/scripts/announce-release.sh b/scripts/announce-release.sh
new file mode 100755
index 0000000..a166378
--- /dev/null
+++ b/scripts/announce-release.sh
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+package="${1}"
+version="${2}"
+package_name="${3}"
+srcdir="${0%/scripts/announce-release.sh}"
+
+about="$(sed -n '
+ H;
+ ${
+ g;
+ s/^\n*[^\n][^\n]*\n[=-][=-]*\n\n*//;
+ s/\n*[^\n][^\n]*\n[=-][=-]*\n.*$//;
+ p;
+ };
+ ' "${srcdir}/README")"
+news="$(sed -n '
+ H;
+ ${
+ g;
+ s/^\n*[^\n][^\n]*\n[=-][=-]*\n\n*//;
+ s/^Released: [^\n]*\n\n*//;
+ s/\n*[^\n][^\n]*\n[=-][=-]*\n.*$//;
+ p;
+ };
+ ' "${srcdir}/NEWS")"
+old_version="$(sed -n "/^${package_name} version /p;" "${srcdir}/NEWS" | \
+ sed -n "2{ s/^${package_name} version //p; };")"
+
+export GIT_DIR="${srcdir}/.git"
+
+/usr/sbin/sendmail \
+ -f pj+proteanos-ml@pehjota.net proteanos-dev@lists.proteanos.com <<-EOF
+ Date: $(LC_ALL='POSIX' date '+%a, %d %b %Y %H:%M:%S %z')
+ From: "Patrick 'P. J.' McDermott" <pj+proteanos-ml@pehjota.net>
+ To: proteanos-dev@lists.proteanos.com
+ Subject: ${package_name} ${version} released
+
+ About
+ =====
+
+ ${about}
+
+ Downloading
+ ===========
+
+ Source archives are available from the files site by HTTP or FTP:
+
+ http://files.proteanos.com/pub/${package}/${version}/
+ ftp://files.proteanos.com/pub/${package}/${version}/
+
+ Here are the MD5 checksums:
+
+ $(sed 's/^/ /' MD5SUMS)
+
+ Here are the SHA-256 checksums:
+
+ $(sed 's/^/ /' SHA256SUMS)
+
+ The sources are maintained in a Git repository:
+
+ http://git.proteanos.com/${package}/${package}.git/
+ git://git.proteanos.com/${package}/${package}.git/
+
+ This release is marked by the "${package}/${version}" tag.
+
+ NEWS for Version ${version}
+ =================$(printf '%s\n' "${version}" | sed 's/./=/g')
+
+ ${news}
+
+ Shortlog of Changes Since Version ${old_version}
+ ==================================$(printf '%s\n' "${old_version}" | \
+ sed 's/./=/g')
+
+ $(git shortlog "${package}/${old_version}..HEAD" | \
+ sed '/^..*$/s/^/ /')
+
+ Diffstat of Changes Since Version ${old_version}
+ ==================================$(printf '%s\n' "${old_version}" | \
+ sed 's/./=/g')
+
+ $(git diff --stat=69 --color=never --find-renames=50% \
+ "${package}/${old_version}..HEAD" | sed 's/^/ /')
+
+ -- $(: Just something to follow the trailing space)
+ Patrick "P. J." McDermott: http://www.pehjota.net/
+ Lead Developer, ProteanOS: http://www.proteanos.com/
+ Founder and CEO, Libiquity: http://www.libiquity.com/
+ EOF