Closed brianoliver closed 8 years ago
Perhaps to achieve this, as part of making a deployment we should dynamically create a "CleanUp" Collector Option that can collect CleanUp Options like "RemoveDirectory" and "RemoveFile".
Additionally we'd add an "onClosed" callback or "undeploy" to the Deployer interface, allowing these CleanUp Options to be used for cleaning up.
When the Application and/or Platform closes, we could then ask the Deployer to undeploy, thus causing the Application(s) to clean themselves up. Alternatively we could make a Deployer an implicit Profile to receive such callbacks.
Completed initial implementation for SSH-based remote platforms. Further multi-platform and terminal testing may be required.
As a developer I expect that any temporary files created during deployment of a remote application are automatically cleaned up when said remote applications are closed (excluding any that are created for caching purposes)