Browse Source

* Updated release script to package the new tufte-book class.

git-svn-id: https://tufte-latex.googlecode.com/svn/trunk@97 516e2f36-ce3a-0410-bea4-1d4a03f5df72
master
Kevin M. Godby 16 years ago
parent
commit
a6b61e7364
3 changed files with 54 additions and 41 deletions
  1. +54
    -41
      release
  2. BIN
      sample-book.pdf
  3. BIN
      sample-handout.pdf

+ 54
- 41
release View File

@@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash


PACKAGE_NAME='tufte-latex'
PACKAGE="tufte-latex"
CLASS_FILES="tufte-handout.cls tufte-book.cls" CLASS_FILES="tufte-handout.cls tufte-book.cls"
STYLE_FILES="tufte-common.sty" STYLE_FILES="tufte-common.sty"
SOURCE_FILES="sample-handout.{pdf,tex,bib} sample-book.{pdf,tex}"
SOURCE_FILES="sample-handout.pdf sample-handout.tex sample-handout.bib sample-book.pdf sample-book.tex"


# Exit on first error: # Exit on first error:


@@ -11,8 +11,7 @@ set -e


# Verify prerequisites: # Verify prerequisites:


if test $# -ne 1
then
if [ $# -ne 1 ]; then
echo "Usage: $0 VERSION" echo "Usage: $0 VERSION"
exit 1 exit 1
fi fi
@@ -20,92 +19,105 @@ fi
CLASS_DATE=`date +%Y/%m/%d` # (with slashes) CLASS_DATE=`date +%Y/%m/%d` # (with slashes)
VERSION=$1 VERSION=$1


if ! echo $VERSION | grep -E "^[0-9]+\.[0-9]+\.[0-9]+$"
then
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)" echo "VERSION 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 for CLASS in $CLASS_FILES; do
if ! grep -q $VERSION $CLASS
then
echo -n "Checking version number of $CLASS..."
if ! grep -q $VERSION $CLASS; then
echo "Error: version skew. '$VERSION' does not match that in $CLASS" echo "Error: version skew. '$VERSION' does not match that in $CLASS"
grep -H ProvidesClass $CLASS grep -H ProvidesClass $CLASS
exit 1 exit 1
fi fi
echo "ok."

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


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

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


if ! grep -q $VERSION History.txt
then
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" echo "Error: no release notes for '$VERSION' found in History.txt"
grep -H $VERSION History.txt grep -H $VERSION History.txt
exit 1 exit 1
fi fi



HISTORY_DATE=`date +%Y-%m-%d` # (with dashes)

if ! grep -q $history_date History.txt
then
echo "Error: '$history_date' not found in History.txt"
grep -H $history_date History.txt
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 exit 1
fi fi
echo "ok."


# Refresh sample documents # Refresh sample documents


echo -n "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 rm -f sample-handout.{aux,log,out,blg,bbl} refresh-sample.log
echo "done."


echo -n "Building sample-book..."
pdflatex sample-book > refresh-sample.log pdflatex sample-book > refresh-sample.log
bibtex sample-book >> refresh-sample.log bibtex sample-book >> refresh-sample.log
texindy --language english sample-book.idx >> refresh-sample.log texindy --language english sample-book.idx >> refresh-sample.log
pdflatex sample-book >> refresh-sample.log pdflatex sample-book >> 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 rm -f sample-bok.{aux,log,out,blg,bbl,idx,ind,toc} refresh-sample.log
echo "done."




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


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


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


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


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


TDS_DIR=pkg/$package/tds/
TDS_TEX_DIR=$TDS_DIR/tex/latex/$package/
TDS_DOC_DIR=$TDS_DIR/doc/latex/$package/
TDS_SRC_DIR=$TDS_DIR/source/latex/$package/
TDS_DIR=pkg/$PACKAGE/tds/
TDS_TEX_DIR=$TDS_DIR/tex/latex/$PACKAGE/
TDS_DOC_DIR=$TDS_DIR/doc/latex/$PACKAGE/
TDS_SRC_DIR=$TDS_DIR/source/latex/$PACKAGE/


echo -n "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 $STYLE_FILES $TDS_TEX_DIR/
@@ -116,29 +128,30 @@ cp graphics/* $TDS_DOC_DIR/graphics/


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


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


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


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


cat << MESSAGE cat << MESSAGE


`openssl dgst -sha1 pkg/$package-$version.zip`
`openssl dgst -sha1 pkg/$PACKAGE-$VERSION.zip`


Don't forget to create an SVN tag (after committing changes), Don't forget to create an SVN tag (after committing changes),


svn cp -m'To tag release $version.' \\
https://$package.googlecode.com/svn/trunk \\
https://$package.googlecode.com/svn/tags/rel_$version
svn cp -m'To tag release $VERSION.' \\
https://$PACKAGE.googlecode.com/svn/trunk \\
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


MESSAGE MESSAGE

BIN
sample-book.pdf View File


BIN
sample-handout.pdf View File


Loading…
Cancel
Save