Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
31 lines (26 loc) · 1001 Bytes

File metadata and controls

executable file
·
31 lines (26 loc) · 1001 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python2.7
from datetime import date
import json
import re
import sys
# Set the version in manifest.json to one based on today's date.
# Set the version in install.rdf and about.xul to one specified on the command
# line.
t = date.today()
f = open('chromium/manifest.json')
manifest = json.loads(f.read())
f.close()
manifest['version'] = `t.year` +'.'+ `t.month` +'.'+ `t.day`
f = open('chromium/manifest.json','w')
f.write(json.dumps(manifest,indent=4,sort_keys=True))
def replace_in_file(from_re, to, filename):
contents = open(filename).read()
with open(filename, 'w') as outfile:
outfile.write(re.sub(from_re, to, contents))
firefox_version = sys.argv[1]
replace_in_file('<em:version>.*</em:version>',
'<em:version>' + firefox_version + '</em:version>',
'src/install.rdf')
replace_in_file('(?s)(https-everywhere.about.version.*?<label>).*?</label>',
'\g<1>' + firefox_version + '</label>',
'src/chrome/content/about.xul')
Morty Proxy This is a proxified and sanitized view of the page, visit original site.