diff options
author | andars <afoote97@gmail.com> | 2015-05-12 18:38:47 -0700 |
---|---|---|
committer | andars <afoote97@gmail.com> | 2015-05-12 18:38:47 -0700 |
commit | c16024871776604e668a3275330ae63ab6745ba4 (patch) | |
tree | 08396bd3193856072c384efce10d5c37e88d923a /python/servo/build_commands.py | |
parent | 234fb68a16ee30c3176c44111825fd0a9ae1449e (diff) | |
download | servo-c16024871776604e668a3275330ae63ab6745ba4.tar.gz servo-c16024871776604e668a3275330ae63ab6745ba4.zip |
Add mac support for build notifications
Closes #5582
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 5b4e46f9e8a..5d5da3298fe 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -55,8 +55,15 @@ def notify(elapsed): print("[Warning] Could not generate notification! Please make sure that the required libraries are installed!") elif sys.platform.startswith('darwin'): - # Notification code for Darwin here! For the time being printing simple msg - print("[Warning] : Darwin System! Notifications not supported currently!") + try: + from distutils.spawn import find_executable + notifier = find_executable('terminal-notifier') + if not notifier: + raise Exception('`terminal-notifier` not found') + subprocess.call([notifier, '-title', 'Servo Build System', + '-group', 'servobuild', '-message', 'Servo build complete!']) + except: + print("[Warning] Could not generate notification! Make sure that `terminal-notifier is installed!") @CommandProvider |