vs-deploy
vs-deploy copied to clipboard
Can pull/download all files from target?
Hey there, it's a great tool for deploy work. I'm not sure if I missed something. I configured an FTP deploy and found that only files both on local and target will be pulled or deployed. Just want to know if I can pull/download all files from the target which are not on local. Any help will be appreciated. Thanks!
@hushedmo
No, only files that are part of your package (or current files / folders) will be handled.
Otherwise you should extend your list of glob patterns in your package definitions.
@mkloubert Thanks for the explanations. You mean I can use files
to extend the list? I tried to add settings:
"files": [
"**/*.+(php|js|css)"
],
But didn't get what I want. For example, there is a file index.php
on the remote. There is NO such file on the local. Can I download the file index.php
to local from remote with pull method?
No, because the glob patterns only work for local files.
Currently I have no chance to use them on the remote side.
@mkloubert Thanks for your explanations. May I suggest a new download feature? This can download all files from remote to local, as sometimes we may need to fetch all files to local first. Then the pull method does the current work (only download files on the list). Appreciate your great work!
When can we expect this enhancement? @mkloubert
@hushedmo @rajeshshou
I will try to implement the feature within the next week.
Oh great! Thanks for such a quick reply. @mkloubert
Also can we have this when some one opens a file,it is synced with remote file automatically in background?
@rajeshshou
I released a new version 9.20.1 that is now able to sync files when opening them in editor:
What you have to do, is to setup your package(s) like that:
{
"deploy": {
"packages": [
{
"name": "My PHP files",
"files": [
"/**/*.php"
],
"syncWhenOpen": "My SFTP server"
}
],
"targets": [
{
"name": "My SFTP server",
"type": "sftp",
// ...
}
]
}
}
@mkloubert Thanks for this amazing feature!
"deploy": {
"packages": [{
"name": "Projects",
"files": [
"**/chart-converter/**",
"**/frontend/**",
"**/options-components/**"
],
"exclude": [
"**/node_modules",
"**/node_modules/**",
"**/bower_components",
"**/bower_components/**",
"**/dist",
"**/dist/**",
"**/deploy.zip",
"**/img",
"**/img/**",
"**/.git",
"**/.git/**",
"**/sftp-config.json",
"**/sftp-settings.json",
"**/i18n",
"**/i18n/**",
"**/sync.ffs_db"
],
"deployOnSave": true,
"syncWhenOpen": true,
"targets": [
"Remote PA3 folders"
],
"fastCheckOnSave": true
}],
"fastCheckForIgnores": true,
"targets": [{
"type": "sftp",
"name": "Remote PA3 folders",
"dir": "/home/user/rshou/projects/",
"host": "myhost",
"port": 22,
"user": "myusername",
"password": "mypassword",
"checkBeforeDeploy": true
}]
}```
Is there anything wrong?
As sync on open did not work for me !
Can't we always sync down when opening the file if deployonsave or deployonchange feature is used? as server files can be updated either by save in which case server and local file would be same or by file changing on remote in that case server file would be newer.
Also if the file does not exist on server then it should be deleted on local if opened or atleast should be asked to whether to delete or not.
@rajeshshou
Oh, sorry ... I forgot to implement minimatch support.
Update to version 9.22.0 and add fastCheckOnSync
to your package:
"deploy":
{
"packages": [{
"name": "Projects",
// ...
"fastCheckOnSync": true
}]
}
@rajeshshou
I released version 9.23.0 with a new setting, called alwaysSyncIfNewer
:
"deploy":
{
"packages": [{
"name": "Projects",
// ...
"alwaysSyncIfNewer": true
}]
}
This will always download the file when opening it and if it is newer on the remote side.
I think that it is the better way to set up this explicitly, especially if you work with SCMs like git.
@mkloubert Perfect! That's great. Also it would be better if I could see the output logs when I open a file because that way i would know the file has finished syncing as sometimes it has a delay in syncing.
Just waiting for the last enhancement where you can download non-local files as well. You are really great man ! Let me know if I can help in anyway.
Log release was awesome !!! @mkloubert
@mkloubert Is this available ? I can see a new release. If yes, how do I use the updateModeOfDirectories if that is related?
@rajeshshou
Unfortunately I still need some days to implement the feature with a new major release.
I currently work in the v10 branch and do only bugfixes and some small enhancements that are related to these fixes for v9.
I have currently implemented this feature for local and sftp targets.
I will release the new version 10.0.0 the time I have implemented this for the other supported targets.
Currently I work on an explorer feature that is brought with the new API of VSCode 1.13.
The positive side effect is, that I can check if the feature works reliable.
BTW: The new updateModeOfDirectories
has something to do with setting modes via chmod
on a SFTP server.