# You should have received a copy of the GNU General Public License along with
# Bugs Everywhere. If not, see <http://www.gnu.org/licenses/>.
+import optparse
import os
import os.path
import shutil
import doctest
doctest.testmod()
-if __name__ == '__main__':
- import optparse
+def main(*args, **kwargs):
usage = """%prog [options] TAG
Create a git tag and a release tarball from the current revision.
p = optparse.OptionParser(usage)
p.add_option('--test', dest='test', default=False,
action='store_true', help='Run internal tests and exit')
- options,args = p.parse_args()
+ options,args = p.parse_args(*args, **kwargs)
if options.test == True:
test()
commit("Bumped to version %s" % _tag)
tag(_tag)
create_tarball(_tag)
+
+
+if __name__ == '__main__':
+ main()