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

Skip copy for same deploy revision #7

Open
mblayman opened this issue Mar 12, 2016 · 3 comments
Open

Skip copy for same deploy revision #7

mblayman opened this issue Mar 12, 2016 · 3 comments

Comments

@mblayman
Copy link

I've got an app where my frontend and backend live in the same repo. I use ember deploy within the context of Ansible to automate the entire process. The cp deploy plugin appears to copy to the destination directory even if the same version is already at the destination.

It would be awesome if the plugin could check the destination to see if the other version is there and then skip copying if it is there. That would save some processing time and, if some other log statement was used instead of Copied revision <rev #>, CM tools like Ansible would have a hook to detect if the deploy actually changed or not.

Thanks!

@dschmidt
Copy link
Owner

Sorry, I completely missed this report.

I see that it does not help with the log message probably, but wouldn't https://github.com/dschmidt/ember-cli-deploy-cp#overwrite help for a start?

@mblayman
Copy link
Author

heh, no worries. Frankly, I forgot I wrote it. 😛

I'm not sure overwrite would really help because I'm deploying to the same location over and over again. Maybe I don't have a clear understanding of what overwrite is supposed to do. I presume overwrite: true wipes out the entire contents before deploying the app. Does overwrite: false skip copying if there is a directory already there? Or does it copy all the files in there and essentially act as a merge with whatever already exists?

I'll have to play with it to be sure. Do you know if the destination has some metadata about the revision that is deployed there? If so, I might be able to write a PR that checks that metadata, compares it to the revision that is about to be deployed and takes no action if it is there. I think that would help the deploy be idempotent and will smooth out the process for an Ansible integration.

@dschmidt
Copy link
Owner

ember-cli-deploy-cp does not provide that - it's basically just a wrapper around cpr. Just try it out maybe? ;-)

I think it should check every file but not override it.. basically copying only files that weren't existent in the former deploy run

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

2 participants