projects
/
be.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b7da7fb
)
release.py: pull main code into main().
author
W. Trevor King
<wking@tremily.us>
Thu, 25 Oct 2012 22:44:22 +0000
(18:44 -0400)
committer
W. Trevor King
<wking@tremily.us>
Thu, 25 Oct 2012 23:02:00 +0000
(19:02 -0400)
release.py
patch
|
blob
|
history
diff --git
a/release.py
b/release.py
index 814e246129b4c46f76e23241291778baa592c4ab..7c5f51c2a7b5244485c8c0ba48d5a6fb759a81d9 100755
(executable)
--- a/
release.py
+++ b/
release.py
@@
-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/>.
# 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 os
import os.path
import shutil
@@
-151,8
+152,7
@@
def test():
import doctest
doctest.testmod()
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.
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')
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()
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)
commit("Bumped to version %s" % _tag)
tag(_tag)
create_tarball(_tag)
+
+
+if __name__ == '__main__':
+ main()