We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5538e37 commit f1b66f0Copy full SHA for f1b66f0
chromium/updates.xml
@@ -1,6 +1,6 @@
1
<?xml version='1.0' encoding='UTF-8'?>
2
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
3
<app appid='eonedblccmhcfofhololkdjedafocaod'>
4
- <updatecheck codebase='https://github.com/downloads/aaronsw/https-everywhere/https-everywhere-0.0.8.1.crx' version='0.0.8.1' />
+ <updatecheck codebase='https://github.com/downloads/aaronsw/https-everywhere/https-everywhere-0.0.8.2.crx' version='0.0.8.2' />
5
</app>
6
</gupdate>
githubhelper.py
@@ -0,0 +1,27 @@
+import json, urllib, sys, os, subprocess
+
+from tokenkeys import oauth_token
+VERSION = sys.argv[1]
+fn = 'pkg/https-everywhere-%s.crx' % VERSION
7
8
+results = json.load(urllib.urlopen('https://api.github.com/repos/aaronsw/https-everywhere/downloads?access_token=%s' % oauth_token, json.dumps(dict(
9
+ name=fn,
10
+ size=os.stat(fn).st_size,
11
+ description='Release of version %s' % VERSION,
12
+ content_type='application/x-chrome-extension'
13
+))))
14
15
+subprocess.Popen(['curl',
16
+ '-F', 'key=%s' % results['path'],
17
+ '-F', "acl=%s" % results['acl'],
18
+ '-F', "success_action_status=201",
19
+ '-F', "Filename=%s" % results['name'],
20
+ '-F', "AWSAccessKeyId=%s" % results['accesskeyid'],
21
+ '-F', "Policy=%s" % results['policy'],
22
+ '-F', "Signature=%s" % results['signature'],
23
+ '-F', "Content-Type=%s" % results['mime_type'],
24
+ '-F', "file=@%s" % fn,
25
+'https://github.s3.amazonaws.com/']).wait()
26
27
+print '\nUploaded.'
makecrx.sh
@@ -1,19 +1,14 @@
-#!/bin/sh
+#!/bin/bash
# How to do a new release:
#
-# 1. Visit https://github.com/aaronsw/https-everywhere/downloads
-# and find the latest version number. Increment it and let the
-# result be $NEWVERSION. So if the latest is 0.0.7.1, then let
-# NEWVERSION=0.0.7.2.
-# 2. Run: ./makecrx.sh $NEWVERSION
-# 3. Upload pkg/https-every-$NEWVERSION.crx to Github.
-# 4. Run:
-# git add chromium/updates.xml
-# git commit -m "release $NEWVERSION"
-# git push
+# 1. Run: ./makecrx.sh
+# 2. It'll ask you to name the new version.
-VERSION=$1
+echo -n "previous versions: "; curl -s "https://api.github.com/repos/aaronsw/https-everywhere/downloads" | grep name | head -n 3 | sed -e 's/ "name": "https-everywhere-//' | sed -e "s/.crx\",/ /" | tr '\n' ' '; echo
+echo -n "New version: "
+read VERSION
sed -e "s/VERSION/$VERSION/g" chromium/updates-master.xml > chromium/updates.xml
@@ -66,4 +61,12 @@ sig_len_hex=$(byte_swap $(printf '%08x\n' $(ls -l "$sig" | awk '{print $5}')))
66
61
echo "$crmagic_hex $version_hex $pub_len_hex $sig_len_hex" | xxd -r -p
67
62
cat "$pub" "$sig" "$zip"
68
63
) > "$crx"
69
-echo "Built .crx."
64
+echo "Built .crx."
65
+python githubhelper.py $VERSION
+git add chromium/updates.xml
+git commit -m "release $VERSION"
70
+git tag -s chrome-$VERSION "release $VERSION"
71
+git push
72
+git push --tags
0 commit comments