aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-04-19 00:14:44 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-04-19 00:14:44 +0800
commit3ebc4716a064b76bfd449ddc828a0c01b9cc4c04 (patch)
treec84cc6d2b0fe6c9825fa769f014344d4b8e6aa4c
parenta92c3b945d26bf8080adcda3286fbd7cb48de125 (diff)
downloadgsoc2013-empathy-3ebc4716a064b76bfd449ddc828a0c01b9cc4c04.tar
gsoc2013-empathy-3ebc4716a064b76bfd449ddc828a0c01b9cc4c04.tar.gz
gsoc2013-empathy-3ebc4716a064b76bfd449ddc828a0c01b9cc4c04.tar.bz2
gsoc2013-empathy-3ebc4716a064b76bfd449ddc828a0c01b9cc4c04.tar.lz
gsoc2013-empathy-3ebc4716a064b76bfd449ddc828a0c01b9cc4c04.tar.xz
gsoc2013-empathy-3ebc4716a064b76bfd449ddc828a0c01b9cc4c04.tar.zst
gsoc2013-empathy-3ebc4716a064b76bfd449ddc828a0c01b9cc4c04.zip
Update release script to take actions in command line options
svn path=/trunk/; revision=963
-rwxr-xr-xrelease.py28
1 files changed, 23 insertions, 5 deletions
diff --git a/release.py b/release.py
index 3f85ceb48..ce0ef96a9 100755
--- a/release.py
+++ b/release.py
@@ -6,6 +6,7 @@ import urllib
import csv
import datetime
from string import Template
+from optparse import OptionParser
username = 'xclaesse'
upload_server = 'master.gnome.org'
@@ -274,8 +275,25 @@ class Project:
self.upload_tarball()
print self.get_release_notes()
-p = Project()
-#print p.generate_news()
-#p.write_news()
-#p.release()
-#print p.get_release_notes()
+if __name__ == '__main__':
+ p = Project()
+ parser = OptionParser()
+ parser.add_option("-n", "--print-news", action="store_true",\
+ dest="print_news", help="Generate and print news")
+ parser.add_option("-p", "--print-notes", action="store_true",\
+ dest="print_notes", help="Generate and print the release notes")
+ parser.add_option("-w", "--write-news", action="store_true",\
+ dest="write_news", help="Generate and write news into the NEWS file")
+ parser.add_option("-r", "--release", action="store_true",\
+ dest="release", help="Release the tarball")
+
+ (options, args) = parser.parse_args ()
+ if (options.print_news):
+ print p.generate_news ()
+ if (options.print_notes):
+ print p.get_release_notes ()
+ if (options.write_news):
+ p.write_news ()
+ if (options.release):
+ p.release ()
+