Skip to content
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

Closed
ChuckJonas opened this issue Aug 20, 2018 · 8 comments
Closed

Deploy on Save #577

ChuckJonas opened this issue Aug 20, 2018 · 8 comments

Comments

@ChuckJonas
Copy link

ChuckJonas commented Aug 20, 2018

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 save

Describe 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

@renatoliveira
Copy link
Contributor

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:

  1. Deploy everything everytime;
  2. Deploy just the single file the user specifies (current);
  3. Deploy just the modified files in the project folder.

I don't think there are extensions for this kind of workflow (yet).

@ntotten ntotten added the type:feedback Feedback for new features label Aug 21, 2018
@gitmatheus
Copy link

That would be a great improvement!

@ChuckJonas
Copy link
Author

@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.

@ntotten ntotten added feature and removed type:feedback Feedback for new features labels Sep 7, 2018
@ntotten ntotten modified the milestone: Org Development Process GA Oct 23, 2018
@ntotten ntotten added the in gus label Oct 23, 2018
@omniphx
Copy link

omniphx commented Oct 25, 2018

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.

@ntotten
Copy link
Contributor

ntotten commented Oct 25, 2018

@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.

@smrobert09
Copy link

smrobert09 commented Oct 31, 2018

@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.

@ntotten ntotten added this to the Org Development Mode: GA milestone Nov 7, 2018
@ntotten ntotten changed the title Add onDidSaveTextDocument hook for "changeset" based deploy Deploy on Save Nov 12, 2018
@NikitaChizhik
Copy link

NikitaChizhik commented Dec 19, 2018

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.
VSCode version is latest and salesforcePack version is latest.

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.

@ntotten
Copy link
Contributor

ntotten commented Feb 28, 2019

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

To deploy files each time you save them, set the user or workspace setting salesforcedx-vscode-core.push-or-deploy-on-save.enabled to true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants