remove the --clean command-line option
This commit is contained in:
parent
62248cb099
commit
8cb0500c0d
2 changed files with 13 additions and 16 deletions
16
README.md
16
README.md
|
@ -120,7 +120,7 @@ Adjust these values accordingly.
|
|||
## Step 4
|
||||
|
||||
middleman build [--clean]
|
||||
middleman deploy [--clean --build-before]
|
||||
middleman deploy [--build-before]
|
||||
|
||||
To run `middleman build` before `middleman deploy`, add:
|
||||
|
||||
|
@ -128,11 +128,17 @@ To run `middleman build` before `middleman deploy`, add:
|
|||
|
||||
Default is `false`.
|
||||
|
||||
## NOTES
|
||||
## BREAKING CHANGES
|
||||
|
||||
When the `--clean` or `--no-clean` option is passed to `middleman
|
||||
build` it will not be passed to `middleman deploy`. For now only the
|
||||
value of `deploy.clean` in `config.rb` will be used.
|
||||
* v0.1.0
|
||||
|
||||
* Removed the `--clean` command-line option. This option only applied
|
||||
to the rsync deploy method. The idea going forward is that
|
||||
command-line options must apply to all deploy methods. Options that
|
||||
are specific to a deploy method will only be available in
|
||||
`config.rb`.
|
||||
|
||||
## NOTES
|
||||
|
||||
Inspired by the rsync task in
|
||||
[Octopress](https://github.com/imathis/octopress).
|
||||
|
|
|
@ -23,14 +23,11 @@ module Middleman
|
|||
end
|
||||
|
||||
desc "deploy [options]", Middleman::Deploy::TAGLINE
|
||||
method_option "clean",
|
||||
:type => :boolean,
|
||||
:aliases => "-c",
|
||||
:desc => "Remove orphaned files or directories on the remote host"
|
||||
method_option "build_before",
|
||||
:type => :boolean,
|
||||
:aliases => "-b",
|
||||
:desc => "Run `middleman build` before the deploy step"
|
||||
|
||||
def deploy
|
||||
if options.has_key? "build_before"
|
||||
build_before = options.build_before
|
||||
|
@ -129,13 +126,7 @@ EOF
|
|||
|
||||
command = "rsync -avze '" + "ssh -p #{port}" + "' #{self.inst.build_dir}/ #{user}@#{host}:#{path}"
|
||||
|
||||
if options.has_key? "clean"
|
||||
clean = options.clean
|
||||
else
|
||||
clean = self.deploy_options.clean
|
||||
end
|
||||
|
||||
if clean
|
||||
if self.deploy_options.clean
|
||||
command += " --delete"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue