From 9ffe89670593744a44b536445649540fc08383b7 Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Tue, 3 Mar 2020 02:51:45 +0000 Subject: [PATCH] Only log the "baking dist/" message when building for release --- src/static_handler.cr | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/static_handler.cr b/src/static_handler.cr index d255bb5..f39cd46 100644 --- a/src/static_handler.cr +++ b/src/static_handler.cr @@ -4,12 +4,14 @@ require "./util" class FS extend BakedFileSystem - {% if read_file? "#{__DIR__}/../dist/favicon.ico" %} - {% puts "baking ../dist" %} - bake_folder "../dist" - {% else %} - {% puts "baking ../public" %} - bake_folder "../public" + {% if flag?(:release) %} + {% if read_file? "#{__DIR__}/../dist/favicon.ico" %} + {% puts "baking ../dist" %} + bake_folder "../dist" + {% else %} + {% puts "baking ../public" %} + bake_folder "../public" + {% end %} {% end %} end