From eb76cfb7eb7438e8829fbe1fddd358e8af1850ad Mon Sep 17 00:00:00 2001 From: Jerome Lacoste Date: Wed, 25 Jul 2018 15:35:07 +0200 Subject: [PATCH 1/2] Fixes #124: do not build unless explicitly asked --- lib/middleman-s3_sync/commands.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/middleman-s3_sync/commands.rb b/lib/middleman-s3_sync/commands.rb index 7921e1b..ed74269 100644 --- a/lib/middleman-s3_sync/commands.rb +++ b/lib/middleman-s3_sync/commands.rb @@ -71,7 +71,8 @@ def s3_sync instrument = options[:instrument] ::Middleman::S3Sync.app = ::Middleman::Application.new do - config[:mode] = :build + mode = options[:build] ? :build : :config + config[:mode] = mode config[:environment] = env ::Middleman::Logger.singleton(verbose, instrument) end From 42d89cbedeb333af93b2cb7c79b336e4b1207b96 Mon Sep 17 00:00:00 2001 From: Jerome Lacoste Date: Wed, 25 Jul 2018 15:38:46 +0200 Subject: [PATCH 2/2] Meh --- lib/middleman-s3_sync/commands.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/middleman-s3_sync/commands.rb b/lib/middleman-s3_sync/commands.rb index ed74269..8004636 100644 --- a/lib/middleman-s3_sync/commands.rb +++ b/lib/middleman-s3_sync/commands.rb @@ -70,8 +70,9 @@ def s3_sync verbose = options[:verbose] ? 0 : 1 instrument = options[:instrument] + mode = options[:build] ? :build : :config + ::Middleman::S3Sync.app = ::Middleman::Application.new do - mode = options[:build] ? :build : :config config[:mode] = mode config[:environment] = env ::Middleman::Logger.singleton(verbose, instrument)