]>
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 po2html
=`which po2html`
35 if test -z "$po2html" ; then
36 echo "cannot find po2html"
40 if test -z "$po2txt" ; then
41 echo "cannot find po2txt"
46 tmpdir
=${TMPDIR:-${PWD}}/${name}-mkrelease
48 rm -rf $name.
tar.gz
$tmpdir
49 trap "rm -rf $tmpdir" 0
52 (git archive
--format=tar HEAD |
tar -xC ${tmpdir}) ||
exit 1
54 if [ ! -f $tmpdir/bootstrap.sh
]; then
55 echo "ERROR! Tag $tag not found"
60 eval `grep "^ *PACKAGE_VERSION=" configure | sed -e 's/-VCS//' | sed -e 's/PACKAGE_//'`
61 eval `grep "^ *PACKAGE_TARNAME=" configure | sed -e 's/_TARNAME//'`
62 if [ ${name} != ${PACKAGE}-${VERSION} ]; then
63 echo "ERROR! The tag and configure version numbers do not match!"
64 echo "${name} != ${PACKAGE}-${VERSION}"
67 RELEASE
=`echo $VERSION | cut -d. -f1,1 | cut -d- -f1`
68 ed
-s configure.ac
<<EOS
69 g/${VERSION}-VCS/ s//${VERSION}/
73 g/${VERSION}-VCS/ s//${VERSION}/
76 ed
-s include
/version.h
<<EOS
77 g/squid_curtime/ s//${RELEASE_TIME}/
81 .
/configure
--silent --enable-translation
90 inst
$tmpdir/${name}.
tar.gz
$dst/${name}.
tar.gz
91 inst
$tmpdir/${name}.
tar.bz2
$dst/${name}.
tar.bz2
92 inst
$tmpdir/ChangeLog
$dst/ChangeLog.txt
93 if [ -f $tmpdir/doc
/release-notes
/release-
$RELEASE.html
]; then
94 inst
$tmpdir/RELEASENOTES.html
$dst/${name}-RELEASENOTES.html
95 ln -sf ${name}-RELEASENOTES.html
$dst/RELEASENOTES.html