]> git.phdru.name Git - mimedecode.git/commitdiff
Version 2.2.1: add mk-distr helper
authorOleg Broytman <phd@phdru.name>
Tue, 24 Dec 2013 15:16:18 +0000 (19:16 +0400)
committerOleg Broytman <phd@phdru.name>
Tue, 24 Dec 2013 15:23:30 +0000 (19:23 +0400)
ANNOUNCE
MANIFEST.in
Makefile
mimedecode_version.py
mk-distr [new file with mode: 0755]

index 6e333e8b1737f04393471c8da815f9aa694516a6..673b7b5ca0519bca614f80b00bbaa4c5c3a80840 100644 (file)
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -22,6 +22,9 @@ one part. If it is a MIME message with multiple parts ("attachments") all parts
 are decoded. Decoding can be controlled by command-line options.
 
 
+WHAT'S NEW in version 2.2.1 (2013-12-24)
+   Add mk-distr helper.
+
 WHAT'S NEW in version 2.2.0 (2013-12-21)
    Rename __version__.py to mimedecode_version.py.
 
index 946712571e7f40336fc0a75e905eaa776ee5b7a7..27de3f59ccb996ddd0f4322908ae58df70f71652 100644 (file)
@@ -1,2 +1,3 @@
-include ANNOUNCE INSTALL.txt Makefile* MANIFEST.in ez_setup.py
-include mimedecode.docbook mimedecode.html mimedecode.txt mimedecode.man
+include ANNOUNCE INSTALL.txt Makefile* MANIFEST.in
+include mimedecode.docbook mimedecode.man mimedecode.html mimedecode.txt
+include ez_setup.py mk-distr
index 6f80b91b44f3bf127f3c80e23ab1909cfe91b379..c4c2827a6fe462a19178755a0473a2c7866dfcd0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,31 +1,10 @@
 
-VERSION=$(shell python -c "from __version__ import __version__; print __version__")
-
 .PHONY: all
-all: docs sdist
-
-DISTFILES = \
-ANNOUNCE \
-INSTALL.txt \
-MANIFEST.in \
-Makefile \
-Makefile.4xslt \
-Makefile.sgmlt \
-Makefile.xsltproc \
-mimedecode.docbook \
-mimedecode.html \
-mimedecode.man \
-mimedecode.py \
-mimedecode.txt \
-mimedecode_version.py \
-setup.py
+all: distr docs
 
-.PHONY: sdist
-sdist: dist/mimedecode-$(VERSION).tar.gz
-
-.PHONY: dist
-dist/mimedecode-$(VERSION).tar.gz: $(DISTFILES)
-       umask 022 && chmod a+rX $(DISTFILES) && python setup.py sdist --formats=bztar
+.PHONY: distr
+distr:
+       ./mk-distr
 
 .PHONY: docs
 docs: mimedecode.man mimedecode.txt mimedecode.html
@@ -38,7 +17,3 @@ CLEANFILES = *.py[co] MANIFEST
 .PHONY: clean
 clean:
        rm -f $(CLEANFILES)
-
-.PHONY: distclean
-distclean: clean
-       rm -rf dist
index f141af2af4e48d041ff5673b05eec031c706a9f4..958a0b60e5a07098440016bbdd572eaca59aaa5b 100644 (file)
@@ -1,4 +1,4 @@
-__version__ = "2.2.0"
+__version__ = "2.2.1"
 __author__ = "Oleg Broytman <phd@phdru.name>"
 __copyright__ = "Copyright (C) 2001-2013 PhiloSoft Design"
 __license__ = "GNU GPL"
diff --git a/mk-distr b/mk-distr
new file mode 100755 (executable)
index 0000000..e31fbdc
--- /dev/null
+++ b/mk-distr
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+umask 022
+
+if [ -n "$1" ]; then
+   git checkout "$1"
+fi &&
+
+git archive --format=tar --prefix=mimedecode/ HEAD |
+   (cd "$HOME/tmp" && exec tar xf -) &&
+cp -p mimedecode.man mimedecode.html mimedecode.txt "$HOME/tmp/mimedecode" &&
+
+cd "$HOME/tmp/mimedecode" &&
+chmod a+r mimedecode.man mimedecode.html mimedecode.txt &&
+python setup.py sdist &&
+cd dist && mv mimedecode-*.tar.gz ../.. && cd ../.. && exec rm -rf mimedecode