Giter Site home page Giter Site logo

Comments (17)

lucasmotta avatar lucasmotta commented on May 29, 2024

Yes! That's how it should work. The content inside the local path will be added to the remote path.

For example, if you have this local file tree:

- production
    - index.html
    - main.js
    - main.css

Then if you set the paths on dploy.yaml like this:

path:
    local: production/
    remote: remote_path/

Your file tree on the server will be:

- remote_path
    - index.html
    - main.js
    - main.css

from dploy.

wouterds avatar wouterds commented on May 29, 2024

Hmm, the paths are set like that but they don't act like you say they should.
Maybe the include property has something to do with that..

This is my dploy.yaml file:

flyingastronauts:
 host: ******
 user: ******
 pass: ******
 scheme: sftp
 slots: 4
 include:
  "production/**": "/"
 path:
  local: production/
  remote: /public_html/beta/

(they end up like this: /public_html/beta/production/files instead of /public_html/beta/files)

from dploy.

lucasmotta avatar lucasmotta commented on May 29, 2024

I see now... it's the current behaviour of the include parameter, but I have to change that since it's not what do you expect when setting the destination.

The only issue that I see for now, it's that you won't be able to set multiple matches in one object key, like this:

include:
  "production/** another_path/**": "/"

But I don't see a problem to ditch that, since you can still achieve the same result by creating a new key:

include:
  "production/**": "/"
  "another_path/**": "/"

I will work on this now and release a new version in a bit.

from dploy.

wouterds avatar wouterds commented on May 29, 2024

Awesome!

from dploy.

lucasmotta avatar lucasmotta commented on May 29, 2024

Version 1.0.3 should fix this. Let me know if it works.

from dploy.

lucasmotta avatar lucasmotta commented on May 29, 2024

Oh, and just to make sure, set the flag check to true, so you can see where your files will be uploaded, before actually uploading it. It's easier to test like this.

from dploy.

wouterds avatar wouterds commented on May 29, 2024

Whenever I run dploy (installed from the git repo) I get these errors: screenshot.

When I just run sudo npm install dploy -g it still installs V1.0.1

from dploy.

wouterds avatar wouterds commented on May 29, 2024

Update: Nvm @ above. Installed 1.0.4 like this sudo npm install dploy -g but I still get the same errors.

module.js:340
    throw err;
          ^
Error: Cannot find module '/usr/local/lib/node_modules/dploy/lib/dploy.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/dploy/bin/dploy:5:6)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

from dploy.

lucasmotta avatar lucasmotta commented on May 29, 2024

It looks like you downloaded DPLOY, but you haven't compiled the CoffeeScript. That's an easy fix, just go to your DPLOY repo and run:

grunt && grunt watch

There's a small note about this on the README file:
https://github.com/LeanMeanFightingMachine/dploy/#contribute

But probably your fork is not the latest one, so I suggest you merging my latest updates first. Let me know how it goes!

from dploy.

wouterds avatar wouterds commented on May 29, 2024

Hmm, I can't remember I did that the first time I used dploy this morning.
I just ran sudo npm install dploy and it just worked.

Now I removed it, installed it the same way as this morning but now I get this error.
But this should fix it: cd to /usr/local/lib/node_modules/dploy and run grunt & grunt watch?

from dploy.

lucasmotta avatar lucasmotta commented on May 29, 2024

That's weird... Have you tried to uninstall and install it again?
If still doesn't work, try what you suggested above, but it's definitely not a solution :(

from dploy.

wouterds avatar wouterds commented on May 29, 2024

Reinstalled it again, now it get a little further.
After confirming the files however I get this:

[ + ] Fail uploading file production: { [Error: Failure] lang: '' }
[ + ] Fail uploading file production: { [Error: Failure] lang: '' }
[ + ] Fail uploading file production: { [Error: Failure] lang: '' }
[ + ] Fail uploading file production: { [Error: Failure] lang: '' }
[ + ] Fail uploading file production: { [Error: Failure] lang: '' }
[ + ] Fail uploading file production: { [Error: Failure] lang: '' }
[ + ] Fail uploading file production: { [Error: Failure] lang: '' }
[ + ] Fail uploading file production: { [Error: Failure] lang: '' }
[ + ] Fail uploading file production: { [Error: Failure] lang: '' }
[ + ] Fail uploading file production: { [Error: Failure] lang: '' }
[ + ] Fail uploading file production: { [Error: Failure] lang: '' }

Screenshot

from dploy.

wouterds avatar wouterds commented on May 29, 2024

Any idea how I solve this issue? Is it a bug or did I do something wrong?

screenshot

from dploy.

lucasmotta avatar lucasmotta commented on May 29, 2024

I finally managed to replicate this bug! Hold on tight, I will fix this!

from dploy.

wouterds avatar wouterds commented on May 29, 2024

Hehe, ok :)!

from dploy.

lucasmotta avatar lucasmotta commented on May 29, 2024

Try now in the version 1.0.7.
The problem was that node-glob was matching folders and files. So I just had to create a filter to match only files, since the folders are created recursively by DPLOY.

from dploy.

wouterds avatar wouterds commented on May 29, 2024

Works perfect now, really a tool that I've been waiting for.
Thanks man, I love it!

from dploy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.