From cfe3b63a618acf09fc27c8eab1707f3f7df355ea Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Thu, 6 May 2021 21:30:32 +0900 Subject: [PATCH] Modify the logic to rename. --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 7db99cd..c500290 100644 --- a/.drone.yml +++ b/.drone.yml @@ -70,7 +70,8 @@ steps: - unzip /tmp/font.zip -d /tmp/font - find /tmp/font -type f -name *.ttf | xargs -I% -n 1 cp -p % assets/font/ - find content/ -type f -name '*.md' | grep -v '_index' | xargs -n 1 /usr/local/bin/tcardgen -f assets/font/ -o static/ogp/ -c assets/tcardgen.yaml > /dev/null 2>&1 - - find static/ogp/ -type f -name '*.png' | xargs -I% -n 1 img2webp -lossy -q 50 % -o `echo % | sed -e 's/png/webp/g'` > /dev/null 2>&1 + - find static/ogp/ -type f -name '*.png' | xargs -I% -n 1 img2webp -lossy -q 50 % -o %.webp > /dev/null 2>&1 + - find static/ogp/ -type f -name '*.png.webp' | xargs -I% -n 1 -t mv % static/ogp/`basename % .png.webp`.webp - find static/ogp/ -type f -name '*.png' | xargs --no-run-if-empty rm - name: hugo