Skip to content

Commit 65dc92e

Browse files
committed
Add an https-everywhere-updates.json file for self-hosted version, and change setversion.py to append to it on every release
1 parent 074a4a0 commit 65dc92e

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

src/https-everywhere-updates.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"addons": {
3+
"https-everywhere-eff@eff.org": {
4+
"updates": [
5+
]
6+
}
7+
}
8+
}

utils/setversion.py

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,35 @@
33
import json
44
import re
55

6+
67
# Set the version in manifest.json to one based on today's date.
7-
# Set the version in install.rdf and about.xul to one specified on the command
8-
# line.
98

109
t = date.today()
10+
version = `t.year` +'.'+ `t.month` +'.'+ `t.day`
11+
1112
f = open('chromium/manifest.json')
1213
manifest = json.loads(f.read())
1314
f.close()
14-
manifest['version'] = `t.year` +'.'+ `t.month` +'.'+ `t.day`
15+
manifest['version'] = version
1516
f = open('chromium/manifest.json','w')
1617
f.write(json.dumps(manifest,indent=4,sort_keys=True,separators=(',', ': ')))
18+
19+
20+
# Add a link to the current version in https-everywhere-updates.json
21+
22+
updates_hash = {
23+
"version": version,
24+
"update_link": "https://eff.org/files/https-everywhere-" + version + "-eff.xpi",
25+
"applications": {
26+
"gecko": {
27+
"strict_min_version": "52.0"
28+
}
29+
}
30+
}
31+
32+
f = open('src/https-everywhere-updates.json')
33+
updates = json.loads(f.read())
34+
f.close()
35+
updates['addons']['https-everywhere-eff@eff.org']['updates'].append(updates_hash);
36+
f = open('src/https-everywhere-updates.json', 'w')
37+
f.write(json.dumps(updates,indent=4,sort_keys=True,separators=(',', ': ')))

0 commit comments

Comments
 (0)