Browse Source

To streamline release script.

git-svn-id: https://tufte-latex.googlecode.com/svn/trunk@152 516e2f36-ce3a-0410-bea4-1d4a03f5df72
master
Bil Kleb 15 years ago
parent
commit
a94d2272c2
2 changed files with 60 additions and 91 deletions
  1. +14
    -12
      History.txt
  2. +46
    -79
      release

+ 14
- 12
History.txt View File

@@ -1,4 +1,5 @@
== 3.5.0 / 2009-12-11
== 3.5.0 - 2009/12/11

* Added a [nohyper] document class option that suppresses loading of the * Added a [nohyper] document class option that suppresses loading of the
hyperref package. hyperref package.
* Added three commands to modify the positioning of the captions. * Added three commands to modify the positioning of the captions.
@@ -14,8 +15,8 @@
package does. package does.
* Fixed a number of bugs. * Fixed a number of bugs.


== 3.0.0 - 2009/05/17


== 3.0.0 / 2009-05-17
* Created a Tufte-book document class. * Created a Tufte-book document class.
* Added optional offset parameter to sienotes, cite, etc. so their vertical * Added optional offset parameter to sienotes, cite, etc. so their vertical
position can be adjusted manually. position can be adjusted manually.
@@ -24,10 +25,11 @@
Tufte's books. Tufte's books.
* Captions are now typeset in the margin as in Tufte's books. * Captions are now typeset in the margin as in Tufte's books.


== 2.0.1 / 2008-11-16
== 2.0.1 - 2008/11/16

* Now works with footmisc version > 5.4. * Now works with footmisc version > 5.4.


== 2.0.0 / 2008-06-06
== 2.0.0 - 2008/06/06


* Added `sfsidenotes' option to set the sidenotes and captions in the sans * Added `sfsidenotes' option to set the sidenotes and captions in the sans
serif font. serif font.
@@ -43,21 +45,21 @@
* Rewrote sample-handout to illustrate the tufte-handout usage and serve as an * Rewrote sample-handout to illustrate the tufte-handout usage and serve as an
example of its features. example of its features.


== 1.2.3 / 2008-02-11
== 1.2.3 - 2008/02/11


* To remove References section from sample-handout. * To remove References section from sample-handout.
* Updated README.txt * Updated README.txt


== 1.2.2 / 2008-02-09
== 1.2.2 - 2008/02/09


* Use footmisc package to set \footnotes as sidenotes * Use footmisc package to set \footnotes as sidenotes
* Use natbib package to set bibliography entries as sidenotes * Use natbib package to set bibliography entries as sidenotes


== 1.2.1 / 2007-10-21
== 1.2.1 - 2007/10/21


* To assure existing \footnotes become \sidenotes * To assure existing \footnotes become \sidenotes


== 1.2.0 / 2007-10-20
== 1.2.0 - 2007/10/20


* Enhancements * Enhancements
* Added a4paper option (Kevin Godby) * Added a4paper option (Kevin Godby)
@@ -65,7 +67,7 @@
* Bug fix * Bug fix
* \@tufteh@overhang typo in figure*, table*, and fullwidth environments (Kevin Godby) * \@tufteh@overhang typo in figure*, table*, and fullwidth environments (Kevin Godby)


== 1.1.0 / 2007-10-18
== 1.1.0 - 2007/10/18


* To add some missing environments and commands: * To add some missing environments and commands:
* sidenote * sidenote
@@ -77,14 +79,14 @@
* To namespace raggedright * To namespace raggedright
* To add margin font hook * To add margin font hook


== 1.0.1 / 2007-09-24
== 1.0.1 - 2007/09/24


* To correct README instructions. * To correct README instructions.


== 1.0.0 / 2007-09-24
== 1.0.0 - 2007/09/24


* First public release * First public release


== 0.1.0 / 2004-02-04
== 0.1.0 - 2004/02/04


* Birthday! * Birthday!

+ 46
- 79
release View File

@@ -1,114 +1,81 @@
#!/bin/bash
#! /bin/bash


PACKAGE="tufte-latex"
CLASS_FILES="tufte-handout.cls tufte-book.cls"
STYLE_FILES="tufte-common.def"
SOURCE_FILES="sample-handout.pdf sample-handout.tex sample-handout.bib sample-book.pdf sample-book.tex"
set -o errexit # exit on first error
set -o nounset # report undefined variables


# Exit on first error:
set +o xtrace # debugging


set -e
PACKAGE="tufte-latex"


# Verify prerequisites:
CLASS_FILES="tufte-handout.cls tufte-book.cls"
DEF_FILES="tufte-common.def"
SOURCE_FILES="sample-handout.pdf sample-handout.tex sample-handout.bib sample-book.pdf sample-book.tex"


if [ $# -ne 1 ]; then
echo "Usage: $0 VERSION"
exit 1
fi
if test $# -ne 1 ; then echo "Usage: $0 3.5.2 (version number)" ; exit 1 ; fi


DATE=`date +%Y/%m/%d` # (with slashes)
VERSION=$1 VERSION=$1
DATE=$(date +"%Y/%m/%d")


echo -n "Testing version number format..."
if ! echo $VERSION | grep -E "^[0-9]+\.[0-9]+\.[0-9]+$"; then
echo "VERSION should be of the form 1.2.5 (major.minor.revision)"
if ! echo $VERSION | egrep -q "^[0-9]+\.[0-9]+\.[0-9]+$" ; then
echo "Error: version argument should be of the form 1.2.5 (major.minor.revision)."
exit 1 exit 1
fi fi
echo "ok."


for CLASS in $CLASS_FILES; do
echo -n "Checking version number of $CLASS..."
if ! grep -q $VERSION $CLASS; then
echo "Error: version skew. '$VERSION' does not match that in $CLASS"
grep -H ProvidesClass $CLASS
exit 1
fi
echo "ok."
# TODO: instead of all this checking, just sed values into the appropriate files


echo -n "Checking date of $CLASS..."
if ! grep -q $DATE $CLASS; then
echo "Error: date skew. '$DATE' does not match that in $CLASS"
grep -H ProvidesClass $CLASS
for class_file in $CLASS_FILES ; do
if ! grep -q $VERSION $class_file -o ! grep -q $DATE $class_file ; then
echo "Error: '$VERSION' and '$DATE' do not match that in $class_file:"
grep -H ProvidesClass $class_file
exit 1 exit 1
fi fi
echo "ok."
done done


for STYLE in $STYLE_FILES; do
echo -n "Checking version number of $STYLE..."
if ! grep -q $VERSION $STYLE; then
echo "Error: version skew. '$VERSION' does not match that in $STYLE"
grep -H ProvidesPackage $STYLE
for aux_file in $DEF_FILES ; do
if ! grep -q $VERSION $aux_file -o ! grep -q $DATE $aux_file ; then
echo "Error: '$VERSION' and '$DATE' do not match that in $aux_file"
grep -H ProvidesFile $aux_file
exit 1 exit 1
fi fi
echo "ok."

echo -n "Checking date of $STYLE..."
if ! grep -q $DATE $STYLE; then
echo "Error: date skew. '$DATE' does not match that in $STYLE"
grep -H ProvidesPackage $STYLE
exit 1
fi
echo "ok."
done done


echo -n "Checking for history notes..."
HISTORY_DATE=`date +%Y-%m-%d` # (with dashes)
if ! grep -q $VERSION History.txt; then
echo "Error: no release notes for '$VERSION' found in History.txt"
grep -H $VERSION History.txt
VERSION_DATE="$VERSION - $DATE"
if ! grep -q "$VERSION_DATE" History.txt ; then
echo "Error: no release notes for '$VERSION_DATE' found in History.txt"
exit 1 exit 1
fi fi


if ! grep -q $HISTORY_DATE History.txt; then
echo "Error: '$HISTORY_DATE' not found in History.txt"
grep -H $HISTORY_DATE History.txt
exit 1
fi
echo "ok."

# Refresh sample documents # Refresh sample documents


echo -n "Building sample-handout..."
echo "Building sample-handout ..."
pdflatex sample-handout > refresh-sample.log pdflatex sample-handout > refresh-sample.log
bibtex sample-handout >> refresh-sample.log bibtex sample-handout >> refresh-sample.log
pdflatex sample-handout >> refresh-sample.log pdflatex sample-handout >> refresh-sample.log
pdflatex sample-handout >> refresh-sample.log pdflatex sample-handout >> refresh-sample.log
rm -f sample-handout.{aux,log,out,blg,bbl} refresh-sample.log
echo "done."
rm -f sample-handout.{aux,blg,bbl,log,out} refresh-sample.log
echo "Success"


echo -n "Building sample-book..."
pdflatex sample-book > refresh-sample.log
bibtex sample-book >> refresh-sample.log
texindy --language english sample-book.idx >> refresh-sample.log
pdflatex sample-book >> refresh-sample.log
pdflatex sample-book >> refresh-sample.log
rm -f sample-bok.{aux,log,out,blg,bbl,idx,ind,toc} refresh-sample.log
echo "done."
echo "Building sample-book ..."
pdflatex sample-book > refresh-book.log
bibtex sample-book >> refresh-book.log
texindy --language english sample-book.idx >> refresh-book.log
pdflatex sample-book >> refresh-book.log
pdflatex sample-book >> refresh-book.log
rm -f sample-book.{aux,blg,bbl,idx,ind,lof,log,lot,out,toc} refresh-book.log
echo "Success"



# To ease googlecode upload, make a distinct version of sample-handout:
# To ease Google Code upload, make a distinct version of samples:


cp sample-handout.pdf sample-handout-$VERSION.pdf cp sample-handout.pdf sample-handout-$VERSION.pdf
cp sample-book.pdf sample-book-$VERSION.pdf
cp sample-book.pdf sample-book-$VERSION.pdf


# Make bundle for Google Code release # Make bundle for Google Code release


echo -n "Creating zip bundle for Google Code release..."
echo "Creating zip bundle for Google Code release ..."
mkdir -p pkg/$PACKAGE-$VERSION mkdir -p pkg/$PACKAGE-$VERSION
tar cf - `cat Manifest.txt` | ( cd pkg/$PACKAGE-$VERSION && tar xf - )
tar -cf - $(cat Manifest.txt) | tar -C pkg/$PACKAGE-$VERSION -xf -
( cd pkg && zip -rq $PACKAGE-$VERSION.zip $PACKAGE-$VERSION ) ( cd pkg && zip -rq $PACKAGE-$VERSION.zip $PACKAGE-$VERSION )
echo "done."
echo "Complete"


# Make bundle for CTAN release # Make bundle for CTAN release


@@ -117,25 +84,25 @@ TDS_TEX_DIR=$TDS_DIR/tex/latex/$PACKAGE/
TDS_DOC_DIR=$TDS_DIR/doc/latex/$PACKAGE/ TDS_DOC_DIR=$TDS_DIR/doc/latex/$PACKAGE/
TDS_SRC_DIR=$TDS_DIR/source/latex/$PACKAGE/ TDS_SRC_DIR=$TDS_DIR/source/latex/$PACKAGE/


echo -n "Creating zip bundle for CTAN release..."
echo "Creating zip bundle for CTAN release ..."
mkdir -p $TDS_DIR $TDS_TEX_DIR $TDS_DOC_DIR $TDS_SRC_DIR mkdir -p $TDS_DIR $TDS_TEX_DIR $TDS_DOC_DIR $TDS_SRC_DIR


cp $CLASS_FILES $STYLE_FILES $TDS_TEX_DIR/
cp $CLASS_FILES $DEF_FILES $TDS_TEX_DIR/


cp History.txt README.txt sample-handout.{pdf,tex,bib} sample-book.{pdf,tex} $TDS_DOC_DIR/ cp History.txt README.txt sample-handout.{pdf,tex,bib} sample-book.{pdf,tex} $TDS_DOC_DIR/
mkdir $TDS_DOC_DIR/graphics mkdir $TDS_DOC_DIR/graphics
cp graphics/* $TDS_DOC_DIR/graphics/ cp graphics/* $TDS_DOC_DIR/graphics/


cp $CLASS_FILES $STYLE_FILES $SOURCE_FILES $TDS_SRC_DIR/
cp $CLASS_FILES $DEF_FILES $SOURCE_FILES $TDS_SRC_DIR/


( cd $TDS_DIR && zip -rq ../../$PACKAGE-$VERSION/$PACKAGE.tds.zip * ) ( cd $TDS_DIR && zip -rq ../../$PACKAGE-$VERSION/$PACKAGE.tds.zip * )
rm -fr pkg/$PACKAGE rm -fr pkg/$PACKAGE
mv pkg/$PACKAGE-$VERSION pkg/$PACKAGE mv pkg/$PACKAGE-$VERSION pkg/$PACKAGE
( cd pkg && zip -rq $PACKAGE.zip $PACKAGE ) ( cd pkg && zip -rq $PACKAGE.zip $PACKAGE )
echo "done."
echo "Complete"


# Remove our temporary files # Remove our temporary files
rm -fr pkg/$PACKAGE
rm -rf pkg/$PACKAGE


# Provide some cut-n-paste material for manual steps: # Provide some cut-n-paste material for manual steps:


@@ -149,7 +116,7 @@ Don't forget to create an SVN tag (after committing changes),
https://$PACKAGE.googlecode.com/svn/trunk \\ https://$PACKAGE.googlecode.com/svn/trunk \\
https://$PACKAGE.googlecode.com/svn/tags/rel_$VERSION https://$PACKAGE.googlecode.com/svn/tags/rel_$VERSION


And upload the zip file,
And upload the zip file:


http://code.google.com/p/$PACKAGE/downloads/list http://code.google.com/p/$PACKAGE/downloads/list
http://ctan.org/upload http://ctan.org/upload


Loading…
Cancel
Save