diff options
author | W. Trevor King <wking@tremily.us> | 2012-10-25 18:44:22 -0400 |
---|---|---|
committer | W. Trevor King <wking@tremily.us> | 2012-10-25 19:02:00 -0400 |
commit | 2926e124f78121ca9f0bbf13a757b9cc2e77cb82 (patch) | |
tree | 3b39a3384b6d4cafba590a09067fc3b7ffe81128 /release.py | |
parent | b7da7fbd0951ea81283296b63d3cfc8844def8a5 (diff) | |
download | bugseverywhere-2926e124f78121ca9f0bbf13a757b9cc2e77cb82.tar.gz |
release.py: pull main code into main().
Diffstat (limited to 'release.py')
-rwxr-xr-x | release.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -18,6 +18,7 @@ # 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 @@ -151,8 +152,7 @@ def test(): 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. @@ -166,7 +166,7 @@ If you don't like what got committed, you can undo the release with 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() @@ -193,3 +193,7 @@ If you don't like what got committed, you can undo the release with commit("Bumped to version %s" % _tag) tag(_tag) create_tarball(_tag) + + +if __name__ == '__main__': + main() |