You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
1.9KB

  1. #!/bin/sh
  2. package='tufte-latex'
  3. class='tufte-handout.cls'
  4. set -e # exit on first error
  5. # Verify prerequisites:
  6. if test $# -ne 1
  7. then
  8. echo "Usage: $0 VERSION"
  9. exit 1
  10. fi
  11. version=$1
  12. if ! echo $version | grep -E "^[0-9]+\.[0-9]+\.[0-9]+$"
  13. then
  14. echo "VERSION should be of the form 1.2.5 (major.minor.revision)"
  15. exit 1
  16. fi
  17. if ! grep -q $version $class
  18. then
  19. echo "Error: version skew. '$version' does not match that in class"
  20. grep -H ProvidesClass $class
  21. exit 1
  22. fi
  23. if ! grep -q $version History.txt
  24. then
  25. echo "Error: no release notes for '$version' found in History.txt"
  26. grep -H $version History.txt
  27. exit 1
  28. fi
  29. class_date=`date +%Y/%m/%d` # (with slashes)
  30. if ! grep -q $class_date $class
  31. then
  32. echo "Error: date skew. '$class_date' does not match that in class"
  33. grep -H ProvidesClass $class
  34. exit 1
  35. fi
  36. history_date=`date +%Y-%m-%d` # (with dashes)
  37. if ! grep -q $history_date History.txt
  38. then
  39. echo "Error: '$history_date' not found in History.txt"
  40. grep -H $history_date History.txt
  41. exit 1
  42. fi
  43. # Refresh sample document
  44. pdflatex sample-handout > refresh-sample.log
  45. bibtex sample-handout >> refresh-sample.log
  46. pdflatex sample-handout >> refresh-sample.log
  47. pdflatex sample-handout >> refresh-sample.log
  48. rm -f sample-handout.{aux,log,out} refresh-sample.log
  49. # For googlecode upload, make a distinct version of sample-handout:
  50. cp sample-handout.pdf sample-handout-$version.pdf
  51. # Make bundle
  52. mkdir -p pkg/$package-$version
  53. tar cf - `cat Manifest.txt` | ( cd pkg/$package-$version && tar xf - )
  54. zip -rq pkg/$package-$version.zip pkg/$package-$version
  55. cat << MESSAGE
  56. `openssl dgst -sha1 pkg/$package-$version.zip`
  57. Don't forget to create an SVN tag (after committing changes),
  58. svn cp -m'To tag release $version.' \\
  59. https://$package.googlecode.com/svn/trunk \\
  60. https://$package.googlecode.com/svn/tags/rel_$version
  61. and upload the zip file,
  62. http://code.google.com/p/$package/downloads/list
  63. http://ctan.org/upload
  64. MESSAGE