Giter Club home page Giter Club logo

Comments (3)

kokoshneta avatar kokoshneta commented on August 22, 2024 1

Doesn't work for me. I tried it for deploying manually. If i deploy a file or folder (via shortcut, button or context menu) it always asks me to which target i want to deploy.

I’ve been deploying more files manually recently than I used to, and this is what I find as well. It seems when you manually deploy, it will always ask where to deploy to; the targets you set up in your settings.json are only used when the deploy action is invoked by an event listener.

I don’t see anything on the wiki that looks like it might apply to manual invocation, so it looks like this may not be possible currently.

from vscode-deploy-reloaded.

kokoshneta avatar kokoshneta commented on August 22, 2024

When you make a package, you choose an array of files to include in that package. You can simply make two packages, one for folder A and one for folder B, with different targets. I’m assuming here you want to deploy on save (or change) – I presume it should work if you want to deploy manually as well (though I rarely use that feature, so I’m not a hundred per cent sure there):

"deploy.reloaded": {
	"packages": [
		{
			"name": "Deploy folder A",
			"files": [
				"folder-a/**/*.*"
			],
			"deployOnSave": [ "Folder A Target" ]
		},

		{
			"name": "Deploy folder B",
			"files": [
				"folder-b/**/*.*"
			],
			"deployOnSave": [ "Folder B Target" ]
		}
	],

	"targets": [
		{
			"type": "ftp", // or whatever type you want to use
			"name": "Folder A Target",
			"dir": "/target-a/"
			// add rest of target settings here
		},
		{
			"type": "ftp", // or whatever type you want to use
			"name": "Folder B Target",
			"dir": "/target-b/"
			// add rest of target settings here
		}
	],
}

from vscode-deploy-reloaded.

bavarianbytes avatar bavarianbytes commented on August 22, 2024

Doesn't work for me. I tried it for deploying manually. If i deploy a file or folder (via shortcut, button or context menu) it always asks me to which target i want to deploy.
I tried that config:

		"packages": [
			{
				"name": "customer1",
				"deployOnSave": false,
				"files": [
					"/customer1folder/**/*"
				],
				"targets": ["target1"]
			},
			{
				"name": "customer2",
				"deployOnSave": false,
				"files": [
					"/customer2folder/**/*"
				],
				"targets": ["target2"]
			}
		],
		"targets": [
			{
				"name": "target1",
				"type": "sftp",
				"host": "***",
				"port": 22,
				"user": "***",
				"password": "***",
				"dir": "/htdocs",
				"mappings": {
					"/customer1folder/**/*": "/htdocs"
				}
			},
			{
				"name": "target2",
				"type": "sftp",
				"host": "***",
				"port": 22,
				"user": "***",
				"password": "***",
				"dir": "/htdocs",
				"mappings": {
					"/customer2folder/**/*": "/htdocs"
				}
			}
                ],

from vscode-deploy-reloaded.

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.