vscode-deploy-reloaded icon indicating copy to clipboard operation
vscode-deploy-reloaded copied to clipboard

folder mappings (multiple workspaces)

Open filly82 opened this issue 7 years ago • 4 comments

Description

How can I get the following mapping to work?

LocalPath: d:\repositories\git\entwicklung\javascript\fapp RemotePath: /home/pi/nodeapps/fapp

Currently this is happening when uploading a file

'd:\repositories\git\entwicklung\javascript\fapp\public\roboto-latin-500italic.a365f2b4.woff2' in '/javascript/fapp/public (SFTP_PI_FAPP)'

but I need the following

'd:\repositories\git\entwicklung\javascript\fapp\public\roboto-latin-500italic.a365f2b4.woff2' in '/public (SFTP_PI_FAPP)'

I am using multiple directories in one single workspace in VSCode and entwicklung is one of these folders

Example config

{
            "type": "sftp",
            "name": "SFTP_PI_FAPP",
            "dir": "/home/pi/nodeapps/fapp",
            "host": "MY_HOST",
            "port": 22,
            "user": "MY_USER",
            "askForPassword": true,
            "mappings": {
               "/entwicklung/javascript/fapp/**/*": "/"
            }
         }

{Please write here, if possible}

Your environment

  • Operating system: Windows 10 latest updates
  • Visual Studio Code version: latest
  • Extension version: latest

Additional comments

{Please write here, if there is something more to tell}

filly82 avatar Jul 20 '18 09:07 filly82

Similar problem here. I have a workspace with multiple modules, each modules folders have different target locations.

source -> target

module/src/ModNameSpace -> /opt/module/src/ModNameSpace
module/src/frontend     -> /opt/app/frontend/module/module

anotherModule/src/AnotherNameSpace -> /opt/anotherModule/src/AnotherNameSpace
anotherModule/src/frontend         -> /opt/app/frontend/module/another

My deploy config looks like this right now:

"deploy.reloaded": {
    "targets": [
        {
            "type": "sftp",
            "name": "wmware",
            "description": "A SFTP folder",
            "dir": "/opt",
            "host": "192.168.73.135",
            "user": "root",
            "password": "***",
            "mappings": {
                "**/ModNameSpace/**/*": "/test4"
            }
        }
    ],
    "packages": [
        {
            "name": "modules",
            "description": "module deployment",
            "files": [
                "**/*"
            ],
            "deployOnChange": true,
            "deployOnSave": true,
            "targets": [
                "wmware"
            ]
        }
    ]
}

working mapping:

**/ModNameSpace/**/*": "/test4"

Not working mappings:

"**/module/src/ModNameSpace/**/*": "/test1",
"/module/src/ModNameSpace/**/*": "/test2",
"module/src/ModNameSpace/**/*": "/test3",

It seems that the root-source-folder is not available in the mappings, which makes it somehow useless for these kind of settings...

I need to define the root-source-folder aka the module-folder-name where the files come from, to tell the mapping where to put the the files on the target.

pyriand3r avatar Dec 12 '18 11:12 pyriand3r

Bump. Why can't we have an absolute path mapped to an absolute path present on the remote machine? I also don't understand what the "dir" parameter is for. Is it the root dir of where I want my files on the remote machine to go?

texascloud avatar Jan 05 '19 01:01 texascloud

Yes, @CamelCaseNotation, the dir parameter is the root folder on the remote machine (if you don't use mappings)

@mkloubert can you give us some advise? 6 month and no word from you... (maybe you have overseen this issue?)

pyriand3r avatar Jan 05 '19 06:01 pyriand3r

Deploying a file to a target where I've set the dir parameter doesn't work at all. It completely ignores it. Let's say my project is set up like:

├── README.md
├── agent
├── server

If I deploy anything under agent to my remote, it just puts the files on the remote machine under /agent/*. Why is it not doing dir + /agent/*????? I just don't understand. Why is this so difficult.

texascloud avatar Jan 09 '19 19:01 texascloud