]>
git.ipfire.org Git - thirdparty/squid.git/blob - mkrelease.sh
3 ## Copyright (C) 1996-2023 The Squid Software Foundation and contributors
5 ## Squid software is distributed under GPLv2+ license and includes
6 ## contributions from numerous individuals and organizations.
7 ## Please see the COPYING and CONTRIBUTORS files for details.
10 if [ $# -ne 1 -a $# -ne 2 ]; then
11 echo "Usage: $0 revision [destination]"
15 # infer tags from command line details
17 rev=`echo $1 | sed -e "s/^${package}-//"`
18 name
=${package}-${rev}
19 tag
=`echo ${name} | tr a-z.- A-Z__`
22 RELEASE_TIME
=`date +%s`
26 # check that $rev has the right syntax
28 checkrev
=`expr $rev : '\([0-9]\.[0-9]\(\.[0-9\.]\)*\)'`
29 if test "$rev" != "$checkrev" ; then
30 echo "revision '$rev' has incorrect syntax. Should be like '3.1.0.1'"
34 tmpdir
=${TMPDIR:-${PWD}}/${name}-mkrelease
36 rm -rf $name.
tar.gz
$tmpdir
37 trap "rm -rf $tmpdir" 0
40 (git archive
--format=tar HEAD |
tar -xC ${tmpdir}) ||
exit 1
42 if [ ! -f $tmpdir/bootstrap.sh
]; then
43 echo "ERROR! Tag $tag not found"
48 eval `grep "^ *PACKAGE_VERSION=" configure | sed -e 's/-VCS//' | sed -e 's/PACKAGE_//'`
49 eval `grep "^ *PACKAGE_TARNAME=" configure | sed -e 's/_TARNAME//'`
50 if [ ${name} != ${PACKAGE}-${VERSION} ]; then
51 echo "ERROR! The tag and configure version numbers do not match!"
52 echo "${name} != ${PACKAGE}-${VERSION}"
55 RELEASE
=`echo $VERSION | cut -d. -f1,1 | cut -d- -f1`
56 NOTES_VERSION
=`grep "$VERSION" doc/release-notes/release-${RELEASE}.sgml`
57 if test "x$NOTES_VERSION" = "x"; then
58 echo "ERROR! Release Notes HTML version numbers do not match!"
61 ed
-s configure.ac
<<EOS
62 g/${VERSION}-VCS/ s//${VERSION}/
66 g/${VERSION}-VCS/ s//${VERSION}/
69 ed
-s include
/version.h
<<EOS
70 g/squid_curtime/ s//${RELEASE_TIME}/
74 .
/configure
--silent --enable-translation
83 inst
$tmpdir/${name}.
tar.gz
$dst/${name}.
tar.gz
84 inst
$tmpdir/${name}.
tar.bz2
$dst/${name}.
tar.bz2
85 inst
$tmpdir/CONTRIBUTORS
$dst/CONTRIBUTORS.txt
86 inst
$tmpdir/COPYING
$dst/COPYING.txt
87 inst
$tmpdir/README
$dst/README.txt
88 inst
$tmpdir/CREDITS
$dst/CREDITS.txt
89 inst
$tmpdir/SPONSORS
$dst/SPONSORS.txt
90 inst
$tmpdir/ChangeLog
$dst/ChangeLog.txt
91 if [ -f $tmpdir/doc
/release-notes
/release-
$RELEASE.html
]; then
92 cat $tmpdir/doc
/release-notes
/release-
$RELEASE.html |
sed -e '
93 s/"ChangeLog"/"ChangeLog.txt"/g;
94 ' > $tmpdir/RELEASENOTES.html
95 touch -r $tmpdir/doc
/release-notes
/release-
$RELEASE.html
$tmpdir/RELEASENOTES.html
96 inst
$tmpdir/RELEASENOTES.html
$dst/${name}-RELEASENOTES.html
97 ln -sf ${name}-RELEASENOTES.html
$dst/RELEASENOTES.html
99 if [ -f $dst/changesets
/.update
]; then
100 rm -f $dst/changesets
/$tag.html
101 $dst/changesets
/.update