From 7eadbdb7d570a0b4cecbf0256a73ea9dad030835 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Tue, 2 Aug 2011 22:27:16 -0700 Subject: [PATCH] fix migrate command --- lib/middleman/cli.rb | 8 +++++--- lib/middleman/version.rb | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/middleman/cli.rb b/lib/middleman/cli.rb index 4e13cdf9..0d4155c4 100644 --- a/lib/middleman/cli.rb +++ b/lib/middleman/cli.rb @@ -34,7 +34,7 @@ module Middleman method_option "livereload", :default => false, :type => :boolean, :desc => "Whether to enable Livereload or not" method_option "livereload-port", :default => "35729", :desc => "The port Livereload will listen on" def server - config_check + config_check && v1_check if options["livereload"] livereload_options = {:port => options["livereload-port"]} end @@ -48,7 +48,7 @@ module Middleman desc "build", "Builds the static site for deployment" method_option "relative", :type => :boolean, :aliases => "-r", :default => false, :desc => 'Override the config.rb file and force relative urls' def build - config_check + config_check && v1_check thor_group = Middleman::Builder.new([], options).invoke_all end @@ -68,7 +68,9 @@ module Middleman $stderr.puts "== Error: Could not find a Middleman project config, perhaps you are in the wrong folder?" exit 1 end - + end + + def v1_check if File.exists?("views") || File.exists?("public") $stderr.puts "== Error: The views and public folders are have been combined. Create a new 'source' folder, add the contents of views and public to it and then remove the empty views and public folders." exit 1 diff --git a/lib/middleman/version.rb b/lib/middleman/version.rb index 842f87b0..9f05e133 100644 --- a/lib/middleman/version.rb +++ b/lib/middleman/version.rb @@ -1,3 +1,3 @@ module Middleman - VERSION = "2.0.0.rc94" + VERSION = "2.0.0.rc95" end