Skip to content

A platform for community discussion. Free, open, simple.

DEV: No need to carry two brotli implementations around

Sam Saffron84f12ac3f73f
diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake
index 03ca08924da..fe374482dd0 100644
--- a/lib/tasks/assets.rake
+++ b/lib/tasks/assets.rake
@@ -116,19 +116,8 @@ def gzip(path)
end
# different brotli versions use different parameters
-ver_out, _ver_err, ver_status = Open3.capture3('brotli --version')
-if !ver_status.success?
- # old versions of brotli don't respond to --version
- def brotli_command(path)
- "brotli --quality 11 --input #{path} --output #{path}.br"
- end
-elsif ver_out >= "brotli 1.0.0"
- def brotli_command(path)
- "brotli -f --quality=11 #{path} --output=#{path}.br"
- end
-else
- # not sure what to do here, not expecting this
- raise "cannot determine brotli version"
+def brotli_command(path)
+ "brotli -f --quality=11 #{path} --output=#{path}.br"
end
def brotli(path)