From 73d6002589c88bcb0e5f48a31a717fea56acdae7 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Thu, 6 May 2021 22:38:11 +0900 Subject: [PATCH] Modify the logic to rename. --- .drone.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index b0ae1fd..fa5a3d4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -69,9 +69,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 - - find static/ogp/ -type f -name '*.png' | xargs -I% -n 1 img2webp -lossy -q 50 % -o %.webp > /dev/null + - find static/ogp/ -type f -name '*.png' | xargs -n 1 -I% basename % .png | xargs -I% -n 1 -t img2webp -lossy -q 50 static/ogp/% -o static/ogp/%.webp > /dev/null - find static/ogp/ -type f -name '*.png' | xargs --no-run-if-empty rm - - find static/ogp/ -type f -name '*.png.webp' | xargs -n 1 -I% basename % .png.webp | xargs -t -n 1 -I% mv %.png.webp %.png - name: hugo image: cibuilds/hugo:0.83.0