]>
git.ipfire.org Git - thirdparty/squid.git/blob - mkrelease.sh
3 ## Copyright (C) 1996-2014 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]"
16 BZRROOT
=${BZRROOT:-/bzr}
18 # infer tags from command line details
20 rev=`echo $1 | sed -e "s/^${package}-//"`
21 name
=${package}-${rev}
22 tag
=`echo ${name} | tr a-z.- A-Z__`
25 RELEASE_TIME
=`date +%s`
29 # check that $rev has the right syntax
31 checkrev
=`expr $rev : '\([0-9]\.[0-9]\.[0-9\.]*\)'`
32 if test "$rev" != "$checkrev" ; then
33 echo "revision '$rev' has incorrect syntax. Should be like '3.1.0.1'"
37 tmpdir
=${TMPDIR:-${PWD}}/${name}-mkrelease
39 rm -rf $name.
tar.gz
$tmpdir
40 trap "rm -rf $tmpdir" 0
42 # AYJ 2008-03-31: add the named tag for use below.
44 bzr
export -r tag
:$tag $tmpdir ||
exit 1
46 # AYJ: 2008-03-31: initial export attempt dies on 'not a branch' error.
47 # bzr export $tmpdir $BZRROOT/$module/tags/$tag || exit 1
49 #bzr export $tmpdir $BZRROOT/$module/tags/$tag || exit 1
50 if [ ! -f $tmpdir/bootstrap.sh
]; then
51 echo "ERROR! Tag $tag not found in $module"
56 eval `grep "^ *PACKAGE_VERSION=" configure | sed -e 's/-BZR//' | sed -e 's/PACKAGE_//'`
57 eval `grep "^ *PACKAGE_TARNAME=" configure | sed -e 's/_TARNAME//'`
58 if [ ${name} != ${PACKAGE}-${VERSION} ]; then
59 echo "ERROR! The tag and configure version numbers do not match!"
60 echo "${name} != ${PACKAGE}-${VERSION}"
63 RELEASE
=`echo $VERSION | cut -d. -f1,2 | cut -d- -f1`
64 ed
-s configure.ac
<<EOS
65 g/${VERSION}-BZR/ s//${VERSION}/
69 g/${VERSION}-BZR/ s//${VERSION}/
72 ed
-s include
/version.h
<<EOS
73 g/squid_curtime/ s//${RELEASE_TIME}/
77 .
/configure
--silent --enable-translation
86 inst
$tmpdir/${name}.
tar.gz
$dst/${name}.
tar.gz
87 inst
$tmpdir/${name}.
tar.bz2
$dst/${name}.
tar.bz2
88 inst
$tmpdir/CONTRIBUTORS
$dst/CONTRIBUTORS.txt
89 inst
$tmpdir/COPYING
$dst/COPYING.txt
90 inst
$tmpdir/README
$dst/README.txt
91 inst
$tmpdir/CREDITS
$dst/CREDITS.txt
92 inst
$tmpdir/SPONSORS
$dst/SPONSORS.txt
93 inst
$tmpdir/ChangeLog
$dst/ChangeLog.txt
94 if [ -f $tmpdir/doc
/release-notes
/release-
$RELEASE.html
]; then
95 cat $tmpdir/doc
/release-notes
/release-
$RELEASE.html |
sed -e '
96 s/"ChangeLog"/"ChangeLog.txt"/g;
97 ' > $tmpdir/RELEASENOTES.html
98 touch -r $tmpdir/doc
/release-notes
/release-
$RELEASE.html
$tmpdir/RELEASENOTES.html
99 inst
$tmpdir/RELEASENOTES.html
$dst/${name}-RELEASENOTES.html
100 ln -sf ${name}-RELEASENOTES.html
$dst/RELEASENOTES.html
102 if [ -f $dst/changesets
/.update
]; then
103 rm -f $dst/changesets
/$tag.html
104 $dst/changesets
/.update