aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-08-26 18:13:29 +0200
committerMattias Andrée <maandree@operamail.com>2012-08-26 18:13:29 +0200
commitac662ed1b878f2fc9618c95a0146c6bde1d19a0a (patch)
treeefef40e0ad3d8a590bfbbeefe39d9c8d6da0fb64
parentf4a16310b37be053666b77a6b131eab88cd24ff8 (diff)
downloadponysay-ac662ed1b878f2fc9618c95a0146c6bde1d19a0a.tar.gz
ponysay-ac662ed1b878f2fc9618c95a0146c6bde1d19a0a.tar.bz2
ponysay-ac662ed1b878f2fc9618c95a0146c6bde1d19a0a.zip
tool fore taggin version and make sure everything is correct
-rwxr-xr-xdev/dist.sh35
-rwxr-xr-xsetup.py2
2 files changed, 27 insertions, 10 deletions
diff --git a/dev/dist.sh b/dev/dist.sh
index 321b0f3..feca38d 100755
--- a/dev/dist.sh
+++ b/dev/dist.sh
@@ -1,5 +1,9 @@
#!/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()
{
@@ -34,16 +38,29 @@ ttyponies()
pdfmanual()
{
- texi2pdf "manuals/ponysay.texinfo"
- git add "manuals/ponysay.texinfo" "ponysay.pdf"
- for ext in `echo aux cp cps fn ky log pg toc tp vr`; do
- if [ -f "ponysay.\$\$ext" ]; then
- unlink "ponysay.$ext"
- fi
- done
- if [ -d "ponysay.t2d" ]; then
- rm -r "ponysay.t2d";
+ texi2pdf "manuals/ponysay.texinfo"
+ git add "manuals/ponysay.texinfo" "ponysay.pdf"
+ for ext in `echo aux cp cps fn ky log pg toc tp vr`; do
+ if [ -f "ponysay.\$\$ext" ]; then
+ unlink "ponysay.$ext"
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
}
diff --git a/setup.py b/setup.py
index 1e41f72..4e1cea3 100755
--- a/setup.py
+++ b/setup.py
@@ -839,7 +839,7 @@ class ArgParser():
if (opt not in self.opts) or (self.opts[opt] is None):
self.opts[opt] = [arg]
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)
'''