-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy on Save #577
Comments
If this ever gets implemented I think it would be a great addition to have the option to deploy only files that were modified since the last successful push. For example: I get three files, and worked on two of them. Instead of deploying all three, or deploying each individual file, the extension can check which files were modified since the last successful deployment (this is important, because if a deployment fails due to a compile error, it would still need to be marked as "changes that we can try to deploy next time"). And of course, this would be great if it were optional as well. Three modes to work with:
I don't think there are extensions for this kind of workflow (yet). |
That would be a great improvement! |
@renatoliveira that would be great; I imagine it would require some type of data structure to track everything. I opened #578 as a different solution to a similar problem. |
If anyone's interested, I published an extension that watches for file changes and auto compiles: https://marketplace.visualstudio.com/items?itemName=omniphx.sfdx-auto-deployer Didn't realize this was already on the roadmap, which is great! I'll probably deprecate it after GA but should serve as a gap solution in the meantime. |
@omniphx You're also welcome to send a PR to add it to the official package if you want. We are aiming to do it pretty soon though if not. |
@renatoliveira @omniphx @ntotten We have an extension that adds the file system tracking. It creates a hash table of the folder structure, detects changes, and allows a 'deploy all changes' type command. SFDX creates the hash file automatically on 'force:source:retrieve --manifest' (the sourcePathInfos.json file under .sfdx/orgs/<orgUsername>/sourcePathInfos.json). The problem is that it deletes as soon as the command finishes, making us rebuild it or try to capture/copy it. I know sandboxes aren't source tracking orgs, meaning that we override changes on every push, but if that file were left in place, this would be an easy win. Is this something we can request from the CLI team @ntotten ? We could easily then create a pull request for this into the official package. |
onDidSaveTextDocument
hook for "changeset" based deploy
Please , could you do deploy on save. (I should press ctrl+save then with mouse choose file from left sidebar and right click and choose to deploy source to org. and repeat it every time I want to deploy) - that's a nightmare.) Note: I am dealing with not scratch org. I develop against any org(simple). Thats my case for now. Now I made a shortcut(ctrl+d) to deploy current open file . BUT it also doesnt work. it writes to me Cannot read property 'fsPath' of undefined. Please look at these two bugs (which prevent me and many others not to use vsCode and this SF plugin). Thanks for your project and work. |
This feature has been implemented as of Dec. 19th. You can find instructions here: https://forcedotcom.github.io/salesforcedx-vscode/articles/user-guide/org-development-model#deploy-source
|
Is your feature request related to a problem? Please describe.
I'm running the new change_set_based_tools and a compile on save is desperately needed.
Describe the solution you'd like
Setting you can add to cause it to run
deploy this source file to org
command on saveDescribe alternatives you've considered
Could probably use a "Run on save extension" but it would be much nicer to have it supported out of the box
Internal Work Item: W-5552627
The text was updated successfully, but these errors were encountered: