Add option for preserving symlinks for aws deploy push command #8908
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #:
#6989
Previously Closed PR - credit to @iansltx:
#3071
Reviving past PR for approval.
By default, symlinks are materialized into their targets when they are zipped for deploy. Some applications, e.g. PHP's Doctrine ORM vendor/bin scripts, rely on symlinks to be preserved to work, and are thus broken by the default deploy behavior if your PHP project's deployment archive includes its vendor directory (which it should).
This commit adds an option (default off for BC reasons) to preserve symlinks when creating the deployment archive. Used --ignore-hidden-files as a template for parameter implementation.
Tests have been updated with the extra argument, including asserting that you can't specify to both preserve and not preserve symlinks simultaneously. However, while I've confirmed that behavior works as expected in the scenario for which I needed this functionality, there isn't an automated test to that effect, partially because I'm not sure how that test would fare across all environments.
References:
https://gist.github.com/kgn/610907
http://www.mail-archive.com/[email protected]/msg34223.html