mirror of
https://github.com/godotengine/godot-website.git
synced 2026-09-03 23:34:58 +03:00
Make the check for minify/gominify binaries quiet (#1097)
This prevents a message for `minify` not being found from being printed every time the website is built if you're using `gominify` instead. This still prints an error if neither `minify` or `gominify` is found.
This commit is contained in:
@@ -8,9 +8,11 @@ Jekyll::Hooks.register :site, :post_write do
|
||||
Pathname from = Pathname.new(File.join(Dir.pwd, "_site"))
|
||||
Pathname to = Pathname.new(Dir.pwd)
|
||||
# Attempt to minify using 'minify', fallback to 'gominify' if not present
|
||||
minify_command = `which minify`.empty? ? 'gominify' : 'minify'
|
||||
if `which #{minify_command}`.empty?
|
||||
puts "Error: Neither 'minify' nor 'gominify' is installed. Please install 'minify'."
|
||||
`command -v minify`
|
||||
minify_command = $?.exitstatus != 0 ? 'gominify' : 'minify'
|
||||
`command -v #{minify_command}`
|
||||
if $?.exitstatus != 0
|
||||
puts "ERROR: Neither 'minify' nor 'gominify' is installed. Please install 'minify'."
|
||||
exit 1
|
||||
end
|
||||
`#{minify_command} -r -o #{to.relative_path_from(here)} #{from.relative_path_from(here)}`
|
||||
|
||||
Reference in New Issue
Block a user