generate-stackbrew-library.sh: Fix detection of deleted files in COPY command#805
generate-stackbrew-library.sh: Fix detection of deleted files in COPY command#805teohhanhui wants to merge 1 commit intodocker-library:masterfrom
Conversation
|
We don't really have the problem of files deleted without some other change in the Dockerfile context directory. |
|
Well, I don't see any down side to this change. Do you? :) It makes the script more robust and removes a shellcheck warning. |
|
Anyway, I think it might be very useful for Alpine variants, where patches may be routinely required (because not everybody cares so much about musl, unfortunately). |
|
The downside is the extra initial churn to PRing and/or committing this to our other 30+ repos in order to keep their generate-stackbrew functions in sync. As for shellcheck warnings, they are irrelevant. We don't use shellcheck.
If there is an obsolete patch, then the next version bump would fail to build and thus necessitate that we remove the patch in order to bump the version (ie "some other change in the Dockerfile context directory"). We don't commit a version bump without a successful build and test. On the other hand, if it builds successfully with a obsolete patch, then the patch is harmless and can be removed at the next context change (version bump). |
Happy to wait until some other necessary change comes along, of course. :)
Shellcheck helps us write better shell scripts. Of course, you don't have to use shellcheck, but it's a valid warning in this case. |
Don't let the shell do glob expansion, because it would not find deleted files.
gitcan.(Discovered when I did coopTilleuls/docker-varnish#39, and fixed in coopTilleuls/docker-varnish#40)
/cc @tianon
References:
https://github.com/koalaman/shellcheck/wiki/SC2207
https://github.com/koalaman/shellcheck/wiki/SC2068