-
Notifications
You must be signed in to change notification settings - Fork 10
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
Carry permissions over when excluding files #23
Conversation
c821d47
to
06afa81
Compare
(.file archiver f) | ||
(.apply (.-file archiver) archiver (clj->js (seq f))))) | ||
(.file archiver f #js {:mode 644}) | ||
(.apply (.-file archiver) archiver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is quite hard to follow - if it's correct, can you bind the update
expression in a let
and use it by name inside .apply?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure can do that.
Hold on, this one apparently does not do what I want, not working recursively. I am digging. |
06afa81
to
efa9a2b
Compare
So this was the problem in #24 |
efa9a2b
to
82c453c
Compare
@@ -22,7 +22,8 @@ | |||
- https://archiverjs.com/docs/Archiver.html#file" | |||
[output-path zip-opts compiler-opts] | |||
|
|||
(let [archiver (archiver "zip" #js {:zlib {:level 9}}) | |||
(let [archiver (archiver "zip" #js {:zlib {:level 9} | |||
:comment (str "Generated by serverless-cljs-plugin on" (.toISOString (js/Date.)))}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mirroring the one in applyZipExclude
which is not always called, so here we take care of that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a very minor issue, but perhaps const comment = ...
before the first use might be easier to follow than having very slightly different timestamps for each entry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok will do
When excluding files from compiled zips in the plugin, permissions were lost. JSZip was not detecting or setting them from the old archive but this patch now correctly does it inside applyZipExclude.
82c453c
to
da81529
Compare
So this one should be good now, I addressed your valid point. |
When excluding files from compiled zips in the plugin, permissions were lost. JSZip was not detecting or setting them from the old archive but this patch now correctly does it inside applyZipExclude.