diff --git a/bin/latest_release.py b/bin/latest_release.py
new file mode 100755
index 0000000000..ee2debb117
--- /dev/null
+++ b/bin/latest_release.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+import sys
+import requests
+
+if __name__ == '__main__':
+ response = requests.get('https://api.github.com/repos/EverythingMe/redash/releases')
+
+ if response.status_code != 200:
+ exit("Failed getting releases (status code: %s)." % response.status_code)
+
+ sorted_releases = sorted(response.json(), key=lambda release: release['id'], reverse=True)
+
+ latest_release = sorted_releases[0]
+ asset_url = latest_release['assets'][0]['url']
+
+ if '--url-only' in sys.argv:
+ print asset_url
+ else:
+ print "Latest release: %s" % latest_release['tag_name']
+ print latest_release['body']
+
+ print "\nTarball URL: %s" % asset_url
+ print 'wget: wget --header="Accept: application/octet-stream" %s' % asset_url
+
+
diff --git a/bin/upload_version.py b/bin/upload_version.py
index 3a074676d9..cb02e4d99e 100644
--- a/bin/upload_version.py
+++ b/bin/upload_version.py
@@ -3,30 +3,44 @@
import sys
import json
import requests
+import subprocess
+
+
+def capture_output(command):
+ proc = subprocess.Popen(command, stdout=subprocess.PIPE)
+ return proc.stdout.read()
+
if __name__ == '__main__':
- version = sys.argv[1]
- filepath = sys.argv[2]
- filename = filepath.split('/')[-1]
- github_token = os.environ['GITHUB_TOKEN']
- auth = (github_token, 'x-oauth-basic')
- commit_sha = os.environ['CIRCLE_SHA1']
-
- params = json.dumps({
- 'tag_name': 'v{0}'.format(version),
- 'name': 're:dash v{0}'.format(version),
- 'target_commitish': commit_sha,
- 'prerelease': True
- })
-
- response = requests.post('https://api.github.com/repos/everythingme/redash/releases',
- data=params,
- auth=auth)
-
- upload_url = response.json()['upload_url']
- upload_url = upload_url.replace('{?name}', '')
-
- with open(filepath) as file_content:
- headers = {'Content-Type': 'application/gzip'}
- response = requests.post(upload_url, file_content, params={'name': filename}, auth=auth, headers=headers, verify=False)
+ version = sys.argv[1]
+ filepath = sys.argv[2]
+ filename = filepath.split('/')[-1]
+ github_token = os.environ['GITHUB_TOKEN']
+ auth = (github_token, 'x-oauth-basic')
+ commit_sha = os.environ['CIRCLE_SHA1']
+
+ commit_body = capture_output(["git", "log", "--format=%b", "-n", "1", commit_sha])
+ file_md5_checksum = capture_output(["md5sum", filename]).split()[0]
+ file_sha256_checksum = capture_output(["sha256sum", filename]).split()[0]
+ version_body = "%s\n\nMD5: %s\nSHA256: %s" % (commit_body, file_md5_checksum, file_sha256_checksum)
+
+ params = json.dumps({
+ 'tag_name': 'v{0}'.format(version),
+ 'name': 're:dash v{0}'.format(version),
+ 'body': version_body,
+ 'target_commitish': commit_sha,
+ 'prerelease': True
+ })
+
+ response = requests.post('https://api.github.com/repos/everythingme/redash/releases',
+ data=params,
+ auth=auth)
+
+ upload_url = response.json()['upload_url']
+ upload_url = upload_url.replace('{?name}', '')
+
+ with open(filepath) as file_content:
+ headers = {'Content-Type': 'application/gzip'}
+ response = requests.post(upload_url, file_content, params={'name': filename}, auth=auth,
+ headers=headers, verify=False)
diff --git a/rd_ui/Gruntfile.js b/rd_ui/Gruntfile.js
index 5d9c59df82..9d41d54e68 100644
--- a/rd_ui/Gruntfile.js
+++ b/rd_ui/Gruntfile.js
@@ -249,6 +249,7 @@ module.exports = function (grunt) {
'.htaccess',
'bower_components/**/*',
'images/{,*/}*.{gif,webp}',
+ 'styles/{,*/}*.{png,gif}',
'fonts/*'
]
}, {
diff --git a/rd_ui/app/scripts/visualizations/base.js b/rd_ui/app/scripts/visualizations/base.js
index f733b1f6ea..abc9fa47bd 100644
--- a/rd_ui/app/scripts/visualizations/base.js
+++ b/rd_ui/app/scripts/visualizations/base.js
@@ -68,6 +68,9 @@
template: '