changeset 3488:dd43b3119b98

make versiondb platform list configurable.
author Han-Wen Nienhuys <hanwen@lilypond.org>
date Sat, 12 May 2007 00:03:39 -0300
parents 692559513c2f
children 778f79a7d288
files bin/installer-builder gub/versiondb.py lilypond.make mingit.make
diffstat 4 files changed, 25 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/bin/installer-builder	Sat May 12 00:02:56 2007 -0300
+++ b/bin/installer-builder	Sat May 12 00:03:39 2007 -0300
@@ -88,6 +88,12 @@
                   help='select target platform',
                   choices=gub.settings.platforms.keys ())
 
+
+    p.add_option ('--platforms', action='store',
+                  dest='platforms',
+                  default='',
+                  help='platforms to inspect; space separated')
+
     p.add_option ('-v', '--verbose', action='count', dest='verbose', default=0)
 
     (options, args) = p.parse_args ()
@@ -158,6 +164,7 @@
     version_tup = tuple (map (int, version.split ('.')))
 
     db = versiondb.VersionDataBase (options.version_db)
+    db.platforms = options.platforms.split (' ')
     buildnumber = '%d' % db.get_next_build_number (version_tup)
 
     settings.installer_version = version
@@ -174,7 +181,7 @@
     installer.checksum = pickle.dumps (checksum_list)
 
 def strip_installer (obj):
-    obj.command (' ** Stage: %s (%s)\n' % ('strip', obj.name))
+    obj.command (' ** Stage: %s (%s installer)\n' % ('strip', obj.name))
     obj.strip ()
 
 def package_installer (installer):
--- a/gub/versiondb.py	Sat May 12 00:02:56 2007 -0300
+++ b/gub/versiondb.py	Sat May 12 00:03:39 2007 -0300
@@ -16,7 +16,7 @@
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
+    along with this program; if not, write toth e Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 """
 
@@ -27,17 +27,6 @@
 import optparse
 import os
 
-platforms = ['linux-x86',
-             'linux-64',
-             'linux-ppc',
-             'darwin-ppc',
-             'darwin-x86',
-             'documentation',
-             'freebsd-x86',
-             'mingw',
-             'cygwin',
-             'source',
-             ]
 
 def get_url_versions (url):
     opener = urllib.URLopener ()
@@ -69,6 +58,7 @@
     def __init__ (self, file_name):
         self._db = {}
         self.file_name = file_name
+        self.platforms = []
         if os.path.exists (file_name):
             self.read ()
             
@@ -93,7 +83,7 @@
 
     def get_binaries_from_url (self, url):
         package = os.path.basename (os.path.splitext (self.file_name)[0])
-        for p in platforms:
+        for p in self.platforms:
             if p == 'source':
                 continue
             
@@ -119,7 +109,7 @@
     def get_next_build_number (self, version_tuple):
         assert (type (version_tuple) == type (()))
         sub_db = {}
-        for platform in platforms:
+        for platform in self.platforms:
             sub_db[platform] = [0]
             if self._db.has_key (platform):
                 sub_db[platform] = [buildnum
@@ -178,6 +168,11 @@
                   default=False,
                   help='self test')
 
+    p.add_option ('--platforms', action='store',
+                  dest='platforms',
+                  default='',
+                  help='platforms to inspect; space separated')
+    
     return p
 
 def main ():
@@ -188,6 +183,7 @@
         options.url += "/"
 
     db = VersionDataBase (options.dbfile)
+    db.platforms = options.platforms.split (' ')
     if options.test:
         print '2.9.28:', db.get_next_build_number ((2,9,28))
         print '2.8.2:', db.get_next_build_number ((2,8,2))
--- a/lilypond.make	Sat May 12 00:02:56 2007 -0300
+++ b/lilypond.make	Sat May 12 00:03:39 2007 -0300
@@ -69,7 +69,9 @@
 ################
 
 unlocked-update-versions:
-	python gub/versiondb.py --dbfile $(LILYPOND_VERSIONS) --download
+	python gub/versiondb.py --dbfile $(LILYPOND_VERSIONS) --download \
+		--platforms="$(PLATFORMS) documentation source"
+
 	python gub/versiondb.py --dbfile uploads/fontconfig.versions --download
 	python gub/versiondb.py --dbfile uploads/guile.versions --download
 	python gub/versiondb.py --dbfile uploads/libtool.versions --download
--- a/mingit.make	Sat May 12 00:02:56 2007 -0300
+++ b/mingit.make	Sat May 12 00:03:39 2007 -0300
@@ -42,4 +42,7 @@
 	$(call BUILD,$@,git)
 
 update-versions:
-	python gub/versiondb.py --no-sources --url http://lilypond.org/git --dbfile uploads/git.db --download
+	python gub/versiondb.py --no-sources --url http://lilypond.org/git --dbfile uploads/git.db --download --platforms="$(PLATFORMS)"
+
+upload:
+	scp `ls -1 -tr upload/git*.exe` hanwen@lilypond.org:www/git/binaries/mingw/