-
Notifications
You must be signed in to change notification settings - Fork 32
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
If WebJar version is a "-snapshot", overwrite existing files when extracting #159
Conversation
This seems good to me. The only issue is that for some reason the behavior is different on Windows. :( |
e5f9aeb
to
f3e6258
Compare
Fixed, this was just a new line quirk in the test I added. BTW. In Play 2.8 this was working because it was using a very outdated webjars-locator-core version that did not have merged yet. Thanks! |
This is being released as |
You rock! |
No, Matthias. You totally rock! :) |
Contains webjars/webjars-locator-core#159 to fix #12484 (cherry picked from commit 6b295a3)
Contains webjars/webjars-locator-core#159 to fix #12484 (cherry picked from commit 6b295a3) # Conflicts: # project/Dependencies.scala
Contains webjars/webjars-locator-core#159 to fix #12484 (cherry picked from commit 6b295a3) # Conflicts: # project/Dependencies.scala
Contains webjars/webjars-locator-core#159 to fix #12484 (cherry picked from commit 6b295a3) # Conflicts: # project/Dependencies.scala
In general, Snapshots usually indicate things are still wip and changing (e.g., that's why you can overwrite artifacts in the sonatype snapshot repository); therefore, existing files should get overwritten when extracting a webjar which obviously is a -snapshot release.
This change alone makes total sense on its own and will not break things, IMHO.
However, the real reason we need this behavior is because it helps us (Play) to fix:
While developing a Play application and editing assets (css, js, etc.) in a sub-project, the sub-project's version usually is a -snapshot, so when a user edits an asset and refreshes the browser, the updated asset (which is internally a webjar) should be served. Currently, this is broken because files will not get overwritten. (I did test this locally with Play apps, and it works with this PR.)
@jamesward If you give thumbs up for this PR, would be nice if you could cut a new release also, thanks!