File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ module Sentry
145
145
property display_name : String
146
146
property should_build = true
147
147
property files = [] of String
148
+ @sound_player : String = " "
148
149
149
150
def initialize (
150
151
@display_name : String ,
@@ -163,6 +164,12 @@ module Sentry
163
164
@app_built = false
164
165
@should_install_shards = install_shards
165
166
@colorize = colorize
167
+
168
+ {% if flag?(:linux ) % }
169
+ @sound_player = ` which aplay 2>/dev/null` .chomp
170
+ {% elsif flag(:darwin ) % }
171
+ @sound_player = ` which afplay 2>/dev/null` .chomp
172
+ {% end % }
166
173
end
167
174
168
175
private def stdout (str : String )
@@ -214,9 +221,13 @@ module Sentry
214
221
if build_result && build_result.success?
215
222
@app_built = true
216
223
create_app_process()
224
+ ` #{ @sound_player } #{ __DIR__ } /sounds/drip.wav 2>/dev/null` unless @sound_player .blank?
217
225
elsif ! @app_built # if build fails on first time compiling, then exit
218
226
stdout " 🤖 Compile time errors detected. SentryBot shutting down..."
227
+ ` #{ @sound_player } #{ __DIR__ } /sounds/error.wav 2>/dev/null` unless @sound_player .blank?
219
228
exit 1
229
+ else
230
+ ` #{ @sound_player } #{ __DIR__ } /sounds/error.wav 2>/dev/null` unless @sound_player .blank?
220
231
end
221
232
end
222
233
You can’t perform that action at this time.
0 commit comments