locomotivecms / wagon

Wagon is a command line tool that let's you develop for Locomotive right on your local machine.
https://www.locomotivecms.com
MIT License
188 stars 117 forks source link

Deploying content_type_templates fails without error #391

Closed greyskin closed 4 years ago

greyskin commented 4 years ago

When running wagon deploy on a content_type_template file, the file fails to deploy and no error is displayed.

I have tried:

Response:

"Pushing Pages Your site has been deployed."

Response:

Your site has been deployed."

Also for the avoidance of doubt I have tried:

Response: (does actually get an error)

ERROR: "wagon deploy" was called with arguments ["staging", "page", "folder/content_type_template"] Usage: "wagon deploy ENV [PATH]"

Response:

Your site has been deployed.

Response:

Pushing Pages [pushes all pages] Your site has been deployed.

greyskin commented 4 years ago

Closed because this is not the issue I originally described. The issue is instead either:

  1. a consistency issue across wagon commands OR
  2. a documentation issue

The docs state with regard to the use of the -f extension:

Filter the resource(s) to be deployed by its name plus extension. It can be used in conjunction with '-r' option to control exactly what is been pushed. (emphasis mine)

The following command works to push content_type_templates:

The reason I had failed to use the file extension is because I had been using the delete command and had just been reading the docs on deletion, which do not include the file extension in the command.

greyskin commented 4 years ago

Ok so it looks like it's 1) a consistency issue across wagon commands

When I want to delete a page with wagon, I must run: bundle exec wagon delete staging page [page-slug] (no -r extension, no -f extension, no file extension)

Running the delete command with -r or -f extensions results in an error as expected:

ERROR: "wagon delete" was called with arguments ["evn", "-r", "page", "-f", "page-slug", "-v"] Usage: "wagon delete ENV RESOURCE [SLUG] [PATH]"

But running the delete command with the file extension (as required for the deploy command) results in an unhelpful error:

Are you sure? [yes, no]

yes

C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/locomotivecms_wagon-3.0.5/lib/locomotive/wagon/commands/concerns/deploy_file_concern.rb:23:in rescue in read_deploy_settings': Unable to read the config/deploy.yml file (No such file or directory @ rb_sysopen - -v/config/deploy.yml) (RuntimeError) from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/locomotivecms_wagon-3.0.5/lib/locomotive/wagon/commands/concerns/deploy_file_concern.rb:15:inread_deploy_settings' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/locomotivecms_wagon-3.0.5/lib/locomotive/wagon/commands/concerns/api_concern.rb:49:in connection_information_from_env_and_path' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/locomotivecms_wagon-3.0.5/lib/locomotive/wagon/commands/delete_command.rb:73:inclient' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/locomotivecms_wagon-3.0.5/lib/locomotive/wagon/commands/delete_command.rb:49:in delete_single' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/locomotivecms_wagon-3.0.5/lib/locomotive/wagon/commands/delete_command.rb:28:indelete' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/locomotivecms_wagon-3.0.5/lib/locomotive/wagon/commands/delete_command.rb:20:in delete' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/locomotivecms_wagon-3.0.5/lib/locomotive/wagon.rb:121:indelete' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/locomotivecms_wagon-3.0.5/lib/locomotive/wagon/cli.rb:401:in delete' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor/command.rb:27:inrun' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in invoke_command' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor.rb:387:indispatch' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor/base.rb:466:in start' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/gems/locomotivecms_wagon-3.0.5/bin/wagon:73:in<top (required)>' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/bin/wagon:23:in load' from C:/Dev/Dependencies/rubyinstaller-2.4.4-1-x64/lib/ruby/gems/2.4.0/bin/wagon:23:in

'