]>
Commit | Line | Data |
---|---|---|
7aef1654 | 1 | #!/bin/sh -e |
2 | if [ $# -gt 1 ]; then | |
3 | echo "Usage: $0 [branch]" | |
4 | exit 1 | |
5 | fi | |
e14c0072 | 6 | module=squid3 |
7aef1654 | 7 | tag=${1:-HEAD} |
8 | startdir=$PWD | |
10f7190b | 9 | date=`env TZ=GMT date +%Y%m%d` |
7aef1654 | 10 | |
bf97dee2 | 11 | tmpdir=${TMPDIR:-${PWD}}/${module}-${tag}-mksnapshot |
7aef1654 | 12 | |
13 | CVSROOT=${CVSROOT:-/server/cvs-server/squid} | |
14 | export CVSROOT | |
15 | ||
16 | rm -rf $tmpdir | |
17 | trap "rm -rf $tmpdir" 0 | |
18 | ||
19be127e | 19 | rm -f ${tag}.out |
e14c0072 | 20 | cvs -Q export -d $tmpdir -r $tag $module |
7aef1654 | 21 | if [ ! -f $tmpdir/configure ]; then |
e14c0072 | 22 | echo "ERROR! Tag $tag not found in $module" |
7aef1654 | 23 | fi |
24 | ||
25 | cd $tmpdir | |
66d21f95 | 26 | eval `grep "^ *VERSION=" configure | sed -e 's/-CVS//'` |
27 | eval `grep "^ *PACKAGE=" configure` | |
7aef1654 | 28 | ed -s configure.in <<EOS |
79325308 | 29 | g/${VERSION}-CVS/ s//${VERSION}-${date}/ |
7aef1654 | 30 | w |
31 | EOS | |
32 | ed -s configure <<EOS | |
79325308 | 33 | g/${VERSION}-CVS/ s//${VERSION}-${date}/ |
7aef1654 | 34 | w |
35 | EOS | |
36 | ||
37 | ./configure --silent | |
19be127e | 38 | make -s dist-all |
7aef1654 | 39 | |
05a55a90 | 40 | basetarball=/server/httpd/htdocs/squid-cache.org/Versions/v`echo $VERSION | cut -d. -f1`/`echo $VERSION | cut -d. -f-2|cut -d- -f1`/${PACKAGE}-${VERSION}.tar.bz2 |
79325308 | 41 | if (echo $VERSION | grep PRE) || (echo $VERSION | grep STABLE); then |
42 | echo "Differences from ${PACKAGE}-${VERSION} to ${PACKAGE}-${VERSION}-${date}" >${PACKAGE}-${VERSION}-${date}.diff | |
43 | if [ -f $basetarball ]; then | |
44 | tar jxf ${PACKAGE}-${VERSION}-${date}.tar.bz2 | |
45 | tar jxf $basetarball | |
46 | diff -ruN ${PACKAGE}-${VERSION} ${PACKAGE}-${VERSION}-${date} >>${PACKAGE}-${VERSION}-${date}.diff || true | |
47 | else | |
b83eb902 | 48 | cvs -q rdiff -u -r SQUID_`echo $VERSION | tr .- __` -r $tag $module >>${PACKAGE}-${VERSION}-${date}.diff || true |
79325308 | 49 | fi |
b8da3ec1 | 50 | elif [ -f STABLE_BRANCH ]; then |
51 | stable=`cat STABLE_BRANCH` | |
52 | echo "Differences from ${stable} to ${PACKAGE}-${VERSION}-${date}" >${PACKAGE}-${VERSION}-${date}.diff | |
53 | cvs -q rdiff -u -r $stable -r $tag $module >>${PACKAGE}-${VERSION}-${date}.diff | |
79325308 | 54 | fi |
55 | ||
7aef1654 | 56 | cd $startdir |
57 | cp -p $tmpdir/${PACKAGE}-${VERSION}-${date}.tar.gz . | |
19be127e | 58 | echo ${PACKAGE}-${VERSION}-${date}.tar.gz >>${tag}.out |
c6a26ddb | 59 | cp -p $tmpdir/${PACKAGE}-${VERSION}-${date}.tar.bz2 . |
71918ca5 | 60 | echo ${PACKAGE}-${VERSION}-${date}.tar.bz2 >>${tag}.out |
79325308 | 61 | if [ -f $tmpdir/${PACKAGE}-${VERSION}-${date}.diff ]; then |
62 | cp -p $tmpdir/${PACKAGE}-${VERSION}-${date}.diff . | |
63 | echo ${PACKAGE}-${VERSION}-${date}.diff >>${tag}.out | |
64 | fi | |
19be127e | 65 | |
c6a26ddb | 66 | relnotes=$tmpdir/doc/release-notes/release-`echo $VERSION | cut -d. -f1,2 | cut -d- -f1`.html |
67 | if [ -f $relnotes ]; then | |
68 | cp -p $relnotes ${PACKAGE}-${VERSION}-${date}-RELEASENOTES.html | |
69 | echo ${PACKAGE}-${VERSION}-${date}-RELEASENOTES.html >>${tag}.out | |
a6528f8d | 70 | ed -s ${PACKAGE}-${VERSION}-${date}-RELEASENOTES.html <<EOF |
71 | g/"ChangeLog"/ s//"${PACKAGE}-${VERSION}-${date}-ChangeLog.txt"/g | |
72 | w | |
73 | EOF | |
c6a26ddb | 74 | fi |
f2cc0e97 | 75 | cp -p $tmpdir/ChangeLog ${PACKAGE}-${VERSION}-${date}-ChangeLog.txt |
76 | echo ${PACKAGE}-${VERSION}-${date}-ChangeLog.txt >>${tag}.out | |
b8da3ec1 | 77 | |
78 | if [ -x $tmpdir/scripts/www/build-cfg-help.pl ]; then | |
79 | make -C $tmpdir/src cf.data | |
80 | mkdir -p $tmpdir/doc/cfgman | |
00a4454c | 81 | $tmpdir/scripts/www/build-cfg-help.pl --version ${VERSION} -o $tmpdir/doc/cfgman $tmpdir/src/cf.data |
b8da3ec1 | 82 | sh -c "cd $tmpdir/doc/cfgman && tar -zcf $PWD/${PACKAGE}-${VERSION}-${date}-cfgman.tar.gz *" |
83 | echo ${PACKAGE}-${VERSION}-${date}-cfgman.tar.gz >>${tag}.out | |
00a4454c | 84 | $tmpdir/scripts/www/build-cfg-help.pl --version ${VERSION} -o ${PACKAGE}-${VERSION}-${date}-cfgman.html -f singlehtml $tmpdir/src/cf.data |
b8da3ec1 | 85 | gzip -f -9 ${PACKAGE}-${VERSION}-${date}-cfgman.html |
86 | echo ${PACKAGE}-${VERSION}-${date}-cfgman.html.gz >>${tag}.out | |
87 | fi |