summaryrefslogtreecommitdiffstats
path: root/scripts/announce-release.sh
blob: a718cc643461ade973fe4aaf1051f5623de0633b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/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/\n*[^\n][^\n]*\n[=-][=-]*\n.*$//;
		p;
	};
	' "${srcdir}/NEWS")"

/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}

	-- $(: Just something to follow the trailing space)
	Patrick "P. J." McDermott
	  http://www.pehjota.net/
	Lead Developer, ProteanOS
	  http://www.proteanos.com/
	EOF