Changeset 1002 for tools/make.py

Show
Ignore:
Timestamp:
2008-07-30 05:09:26 (5 months ago)
Author:
MaierMan
Message:

* require --updateURL for nightlies

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/make.py

    r1001 r1002  
    3434locales_headers = {} 
    3535locales_file = 'locales.tar.gz' 
    36 update_url = 'http://code.downthemall.net/nightly/update.rdf' 
    3736 
    3837xpi_file = 'downthemall.xpi' 
     
    4847         
    4948    def create(self, xpi_file): 
    50         global locales_url, locales_headers, update_url 
     49        global locales_url, locales_headers 
    5150        yield "preparing" 
    5251        self.prepare() 
     
    6160        if self.opts.nightly: 
    6261            yield "nightlifying" 
    63             self.nightlify(update_url
     62            self.nightlify(
    6463        if self.opts.extid: 
    6564            yield "setting the extension id" 
     
    122121         
    123122 
    124     def nightlify(self, update_url): 
     123    def nightlify(self): 
    125124        'open' 
    126125        rdf = xml_open('%s/install.rdf' % self.opts.exportTo) 
     
    136135        node = rdf.getElementsByTagNameNS(NS_EM, 'aboutURL')[0] 
    137136        u = rdf.createElementNS(NS_EM, 'em:updateURL') 
    138         u.appendChild(rdf.createTextNode(update_url)) 
     137        u.appendChild(rdf.createTextNode(self.opts.updateURL)) 
    139138        node.parentNode.insertBefore(u, node) 
    140139 
     
    302301        ) 
    303302    parser.add_option( 
     303        '--updateURL', 
     304        dest='updateURL', 
     305        help='The update url of the nightly build', 
     306        type="string" 
     307        ) 
     308    parser.add_option( 
    304309        '--release', 
    305310        dest='release', 
     
    348353        args = ['trunk'] 
    349354 
     355    if opts.nightly and not opts.updateURL: 
     356        parser.error("when building nightlies you must provide an updateURL") 
     357 
    350358    opts.branch, = args 
    351359