|
21 | 21 |
|
22 | 22 | cd $(dirname $0) |
23 | 23 |
|
24 | | -if [ -n "$1" -a "$1" != "--remove-update-channel" ]; then |
| 24 | +if [ -n "$1" -a "$1" != "--remove-extension-update" -a "$1" != "--remove-update-channels" ]; then |
25 | 25 | BRANCH=`git branch | head -n 1 | cut -d \ -f 2-` |
26 | 26 | SUBDIR=checkout |
27 | 27 | [ -d $SUBDIR ] || mkdir $SUBDIR |
@@ -74,13 +74,21 @@ python3.6 -c "import json; m=json.loads(open('pkg/crx/manifest.json').read()); m |
74 | 74 | # Remove the 'update_url' manifest key from the xpi version of the extension delivered to AMO |
75 | 75 | python3.6 -c "import json; m=json.loads(open('pkg/xpi-amo/manifest.json').read()); del m['applications']['gecko']['update_url']; m['applications']['gecko']['id'] = 'https-everywhere@eff.org'; open('pkg/xpi-amo/manifest.json','w').write(json.dumps(m,indent=4,sort_keys=True))" |
76 | 76 |
|
77 | | -# If the --remove-update-channel flag is set, ensure the extension is unable to update |
78 | | -if [ "$1" == "--remove-update-channel" -o "$2" == "--remove-update-channel" ]; then |
79 | | - echo "Flag --remove-update-channel specified. Removing the XPI extensions' ability to update." |
| 77 | +# If the --remove-extension-update flag is set, ensure the extension is unable to update |
| 78 | +if [ "$1" == "--remove-extension-update" -o "$2" == "--remove-extension-update" -o "$3" == "--remove-extension-update" ]; then |
| 79 | + echo "Flag --remove-extension-update specified. Removing the XPI extensions' ability to update." |
80 | 80 | python3.6 -c "import json; m=json.loads(open('pkg/xpi-amo/manifest.json').read()); m['applications']['gecko']['update_url'] = 'data:text/plain,'; open('pkg/xpi-amo/manifest.json','w').write(json.dumps(m,indent=4,sort_keys=True))" |
81 | 81 | python3.6 -c "import json; m=json.loads(open('pkg/xpi-eff/manifest.json').read()); m['applications']['gecko']['update_url'] = 'data:text/plain,'; open('pkg/xpi-eff/manifest.json','w').write(json.dumps(m,indent=4,sort_keys=True))" |
82 | 82 | fi |
83 | 83 |
|
| 84 | +# If the --remove-update-channels flag is set, remove all out-of-band update channels |
| 85 | +if [ "$1" == "--remove-update-channels" -o "$2" == "--remove-update-channels" -o "$3" == "--remove-update-channels" ]; then |
| 86 | + echo "Flag --remove-update-channels specified. Removing all out-of-band update channels." |
| 87 | + echo "update_channels = [];" >> pkg/crx/background-scripts/update_channels.js |
| 88 | + echo "update_channels = [];" >> pkg/xpi-amo/background-scripts/update_channels.js |
| 89 | + echo "update_channels = [];" >> pkg/xpi-eff/background-scripts/update_channels.js |
| 90 | +fi |
| 91 | + |
84 | 92 | if [ -n "$BRANCH" ] ; then |
85 | 93 | crx="pkg/https-everywhere-$VERSION.crx" |
86 | 94 | xpi_amo="pkg/https-everywhere-$VERSION-amo.xpi" |
|
0 commit comments