Use `egrep` instead of `find -regex`:

```
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -38,7 +38,7 @@ jobs:
           name: "Gzip css/js/images"
           working_directory: /root/project/
           command: |
-            for TARGET in `find ./public/ -type f -regextype posix-egrep -regex ".*\.(css|js|png|jpg|JPG|PNG|CSS|JS)"`
+            for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"`
             do
               gzip -c ${TARGET} > ${TARGET}.gz
             done
```
This commit is contained in:
Kazuhiro MUSASHI 2019-05-04 20:57:27 +08:00
parent 7caefb9317
commit 46353b48e8
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ jobs:
name: "Gzip css/js/images" name: "Gzip css/js/images"
working_directory: /root/project/ working_directory: /root/project/
command: | command: |
for TARGET in `find ./public/ -type f -regextype posix-egrep -regex ".*\.(css|js|png|jpg|JPG|PNG|CSS|JS)"` for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"`
do do
gzip -c ${TARGET} > ${TARGET}.gz gzip -c ${TARGET} > ${TARGET}.gz
done done