tool fore taggin version and make sure everything is correct

This commit is contained in:
Mattias Andrée 2012-08-26 18:13:29 +02:00
parent f4a16310b3
commit ac662ed1b8
2 changed files with 27 additions and 10 deletions

View file

@ -1,5 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# USAGE: dev/dist.sh ttyponies
# or dev/dist.sh pdfmanual
# or dev/dist.sh tag VERSION [OTHER OPTIONS FOR `git tag`]
ttyponies() ttyponies()
{ {
@ -34,16 +38,29 @@ ttyponies()
pdfmanual() pdfmanual()
{ {
texi2pdf "manuals/ponysay.texinfo" texi2pdf "manuals/ponysay.texinfo"
git add "manuals/ponysay.texinfo" "ponysay.pdf" git add "manuals/ponysay.texinfo" "ponysay.pdf"
for ext in `echo aux cp cps fn ky log pg toc tp vr`; do for ext in `echo aux cp cps fn ky log pg toc tp vr`; do
if [ -f "ponysay.\$\$ext" ]; then if [ -f "ponysay.\$\$ext" ]; then
unlink "ponysay.$ext" unlink "ponysay.$ext"
fi
done
if [ -d "ponysay.t2d" ]; then
rm -r "ponysay.t2d";
fi fi
done
if [ -d "ponysay.t2d" ]; then
rm -r "ponysay.t2d";
fi
}
tag()
{
version=`./setup.py version`
if [ "version" = 'Ponysay '"$1"' installer' ]; then
git tag -a "$@" && git checkout "$1" && git push -u origin "$1"
else
echo 'Setup script reports. '"$version"
echo 'This is not consistent with desired tag version: '"$1"
echo 'Make sure the version is correct in setup.py and that all change logs are up to date'
fi
} }

View file

@ -839,7 +839,7 @@ class ArgParser():
if (opt not in self.opts) or (self.opts[opt] is None): if (opt not in self.opts) or (self.opts[opt] is None):
self.opts[opt] = [arg] self.opts[opt] = [arg]
else: else:
sys.stderr.write('%s: fatal: duplicate option %s\n' % (self.__program, arg)) sys.stderr.write('%s: fatal: duplicate option %s\n' % (self.__program, arg))
exit(-1) exit(-1)
''' '''