Update material design icons

pull/680/head
Paulus Schoutsen 2015-12-05 13:20:00 -08:00
parent eefa62748b
commit 705e3e4fbb
3 changed files with 10 additions and 9 deletions

View File

@ -1,2 +1,2 @@
""" DO NOT MODIFY. Auto-generated by update_mdi script """
VERSION = "38EF63D0474411E4B3CF842B2B6CFE1B"
VERSION = "7d76081c37634d36af21f5cc1ca79408"

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
"""
Downloads the latest Polymer v1 iconset version for materialdesignicons.com
"""
import hashlib
import os
import re
import requests
@ -75,17 +75,18 @@ def main():
print("materialdesignicons.com icon updater")
local_version = get_local_version()
remote_version, remote_url = get_remote_version()
print('Local version:', local_version)
print('Remote version:', remote_version)
# The remote version is not reliable.
_, remote_url = get_remote_version()
if local_version == remote_version:
source = clean_component(requests.get(remote_url).text)
new_version = hashlib.md5(source.encode('utf-8')).hexdigest()
if local_version == new_version:
print('Already on the latest version.')
sys.exit()
write_component(remote_version,
clean_component(requests.get(remote_url).text))
write_component(new_version, source)
print('Updated to latest version')
if __name__ == '__main__':