From 58a8b966115598e6eb7fbd4f5b6b9edc7e48657a Mon Sep 17 00:00:00 2001 From: Adam Cooke Date: Thu, 18 May 2017 12:02:16 +0100 Subject: [PATCH] don't compile assets on initialization if they already are built --- bin/postal | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/postal b/bin/postal index d807812..87172ec 100755 --- a/bin/postal +++ b/bin/postal @@ -70,7 +70,12 @@ case "$1" in ;; initialize) - run "bundle exec rake assets:precompile db:schema:load db:seed" + echo 'Initializing database' + run "bundle exec rake db:schema:load db:seed" + if [ ! -f "public/assets/.prebuilt" ]; then + echo 'Compiling Assets' + run "bundle exec rake assets:precompile" + fi ;; default-dkim-record)