Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small issue with using Vagrant as a local dev environment. #38

Open
Vinsanity opened this issue Aug 30, 2016 · 0 comments
Open

Small issue with using Vagrant as a local dev environment. #38

Vinsanity opened this issue Aug 30, 2016 · 0 comments

Comments

@Vinsanity
Copy link

Love this plugin BTW. Thanks for the hard work.

I ran into an issue with Vagrant being my local dev environment and using the server ... :roles%w{dev} and :dev_path settings you defined at the bottom of the README within deploy.rb.

Using Capistrano 3.6.1 and the current version of this plugin.

Basically when I attempt to run cap <stage> deploy it tries to deploy to my remote stage and the vagrant box simultaneously and errors out. However, when I set that server to :no_release, true it works again.

I created a development.rb file in the deploy folder so I could use the wpcli:run command from outside the box but I can't run that command from outside the box because it is looking for a release_path. Since my vagrant box isn't a release, would you recommend I take another approach or create a pull request to modify that task for wpcli:run?

My idea would be to modify it for the dev role something like this:

task :run, :command do |t, args|
  args.with_defaults(:command => :help)
    on roles(:dev) do
      within fetch(:dev_path) do
        execute :wp, args[:command], fetch(:wpcli_args)
      end
  end
  on release_roles(fetch(:wp_roles)) do
    within release_path do
      execute :wp, args[:command], fetch(:wpcli_args)
    end
  end
end

I haven't tested this yet. Just wondering if this is the right approach based on the deploy issue above?

  • Vinny
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant