------------------------------------------------------------ revno: 11716 revision-id: squid3@treenet.co.nz-20110909091310-usrub2adpg2bfamx parent: squid3@treenet.co.nz-20110908141105-jd5695bogr7ry8r4 committer: Amos Jeffries branch nick: trunk timestamp: Fri 2011-09-09 03:13:10 -0600 message: Maintenance: add revno and build-info to snapshot bundles ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20110909091310-usrub2adpg2bfamx # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 9c227392a8cc4e52d1f93b467e5c450401c6e8c4 # timestamp: 2011-09-09 09:54:14 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20110908141105-\ # jd5695bogr7ry8r4 # # Begin patch === modified file 'mksnapshot.sh' --- mksnapshot.sh 2011-08-24 12:54:45 +0000 +++ mksnapshot.sh 2011-09-09 09:13:10 +0000 @@ -17,6 +17,9 @@ tag=${2:-`basename $branchpath`} startdir=${PWD} date=`env TZ=GMT date +%Y%m%d` +revision=`bzr revno` + +suffix="${date}-r${revision}" tmpdir=${TMPDIR:-${PWD}}/${module}-${tag}-mksnapshot @@ -36,11 +39,11 @@ eval `grep "^ *PACKAGE_VERSION=" configure | sed -e 's/-BZR//' | sed -e 's/PACKAGE_//'` eval `grep "^ *PACKAGE_TARNAME=" configure | sed -e 's/_TARNAME//'` ed -s configure.ac <${PACKAGE}-${VERSION}-${date}.diff - diff -ruN ${PACKAGE}-${VERSION} ${PACKAGE}-${VERSION}-${date} >>${PACKAGE}-${VERSION}-${date}.diff || true + echo "Differences from ${PACKAGE}-${VERSION} to ${PACKAGE}-${VERSION}-${suffix}" >${PACKAGE}-${VERSION}-${suffix}.diff + diff -ruN ${PACKAGE}-${VERSION} ${PACKAGE}-${VERSION}-${suffix} >>${PACKAGE}-${VERSION}-${suffix}.diff || true else echo "Building Tarball diff ... skipped (no tarball exists)." fi cd ${startdir} -echo "Preparing to publish: ${tmpdir}/${PACKAGE}-${VERSION}-${date}.tar.* ..." +echo "Preparing to publish: ${tmpdir}/${PACKAGE}-${VERSION}-${suffix}.tar.* ..." #echo "LOCAL: " ; pwd #echo "BUILT TARS: " ; ls -1 ${tmpdir}/*.tar.* || true -cp -p ${tmpdir}/${PACKAGE}-${VERSION}-${date}.tar.gz . -echo ${PACKAGE}-${VERSION}-${date}.tar.gz >>${tag}.out -cp -p ${tmpdir}/${PACKAGE}-${VERSION}-${date}.tar.bz2 . -echo ${PACKAGE}-${VERSION}-${date}.tar.bz2 >>${tag}.out -if [ -f ${tmpdir}/${PACKAGE}-${VERSION}-${date}.diff ]; then - cp -p ${tmpdir}/${PACKAGE}-${VERSION}-${date}.diff . - echo ${PACKAGE}-${VERSION}-${date}.diff >>${tag}.out +cp -p ${tmpdir}/${PACKAGE}-${VERSION}-${suffix}.tar.gz . +echo ${PACKAGE}-${VERSION}-${suffix}.tar.gz >>${tag}.out +cp -p ${tmpdir}/${PACKAGE}-${VERSION}-${suffix}.tar.bz2 . +echo ${PACKAGE}-${VERSION}-${suffix}.tar.bz2 >>${tag}.out +if [ -f ${tmpdir}/${PACKAGE}-${VERSION}-${suffix}.diff ]; then + cp -p ${tmpdir}/${PACKAGE}-${VERSION}-${suffix}.diff . + echo ${PACKAGE}-${VERSION}-${suffix}.diff >>${tag}.out fi relnotes=${tmpdir}/doc/release-notes/release-`echo ${VERSION} | cut -d. -f1,2 | cut -d- -f1`.html if [ -f ${relnotes} ]; then - cp -p ${relnotes} ${PACKAGE}-${VERSION}-${date}-RELEASENOTES.html - echo ${PACKAGE}-${VERSION}-${date}-RELEASENOTES.html >>${tag}.out - ed -s ${PACKAGE}-${VERSION}-${date}-RELEASENOTES.html <>${tag}.out + ed -s ${PACKAGE}-${VERSION}-${suffix}-RELEASENOTES.html <>${tag}.out +cp -p ${tmpdir}/ChangeLog ${PACKAGE}-${VERSION}-${suffix}-ChangeLog.txt +echo ${PACKAGE}-${VERSION}-${suffix}-ChangeLog.txt >>${tag}.out # Generate Configuration Manual HTML if [ -x ${tmpdir}/scripts/www/build-cfg-help.pl ]; then make -C ${tmpdir}/src cf.data mkdir -p ${tmpdir}/doc/cfgman ${tmpdir}/scripts/www/build-cfg-help.pl --version ${VERSION} -o ${tmpdir}/doc/cfgman ${tmpdir}/src/cf.data - sh -c "cd ${tmpdir}/doc/cfgman && tar -zcf ${PWD}/${PACKAGE}-${VERSION}-${date}-cfgman.tar.gz *" - echo ${PACKAGE}-${VERSION}-${date}-cfgman.tar.gz >>${tag}.out - ${tmpdir}/scripts/www/build-cfg-help.pl --version ${VERSION} -o ${PACKAGE}-${VERSION}-${date}-cfgman.html -f singlehtml ${tmpdir}/src/cf.data - gzip -f -9 ${PACKAGE}-${VERSION}-${date}-cfgman.html - echo ${PACKAGE}-${VERSION}-${date}-cfgman.html.gz >>${tag}.out + sh -c "cd ${tmpdir}/doc/cfgman && tar -zcf ${PWD}/${PACKAGE}-${VERSION}-${suffix}-cfgman.tar.gz *" + echo ${PACKAGE}-${VERSION}-${suffix}-cfgman.tar.gz >>${tag}.out + ${tmpdir}/scripts/www/build-cfg-help.pl --version ${VERSION} -o ${PACKAGE}-${VERSION}-${suffix}-cfgman.html -f singlehtml ${tmpdir}/src/cf.data + gzip -f -9 ${PACKAGE}-${VERSION}-${suffix}-cfgman.html + echo ${PACKAGE}-${VERSION}-${suffix}-cfgman.html.gz >>${tag}.out fi # Collate Manual Pages and generate HTML versions @@ -118,13 +122,13 @@ for f in `ls -1 ${tmpdir}/doc/manuals/*.1 ${tmpdir}/doc/manuals/*.8 2>/dev/null` ; do cat ${f} | groff -E -Thtml -mandoc >${f}.html done - sh -c "cd ${tmpdir}/doc/manuals && tar -zcf ${PWD}/${PACKAGE}-${VERSION}-${date}-manuals.tar.gz *.html *.1 *.8" - echo ${PACKAGE}-${VERSION}-${date}-manuals.tar.gz >>${tag}.out + sh -c "cd ${tmpdir}/doc/manuals && tar -zcf ${PWD}/${PACKAGE}-${VERSION}-${suffix}-manuals.tar.gz *.html *.1 *.8" + echo ${PACKAGE}-${VERSION}-${suffix}-manuals.tar.gz >>${tag}.out fi # Generate language-pack tarballs # NP: Only to be done on trunk. if test "${tag}" = "trunk" ; then - sh -c "cd ${tmpdir}/errors && tar -zcf ${PWD}/${PACKAGE}-${VERSION}-${date}-langpack.tar.gz ./*/* ./alias* ./TRANSLATORS ./COPYRIGHT " - echo ${PACKAGE}-${VERSION}-${date}-langpack.tar.gz >>${tag}.out + sh -c "cd ${tmpdir}/errors && tar -zcf ${PWD}/${PACKAGE}-${VERSION}-${suffix}-langpack.tar.gz ./*/* ./alias* ./TRANSLATORS ./COPYRIGHT " + echo ${PACKAGE}-${VERSION}-${suffix}-langpack.tar.gz >>${tag}.out fi