From 1ef34a6aaccfb841a7b7b12c4ab681caceb6e81d Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 5 Jan 2020 19:59:08 +0800 Subject: [PATCH] Use `drone.io` to modify Amazon links. --- .drone.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..6d3eb11 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,15 @@ +kind: pipeline +type: docker +name: default + +steps: + - name: fetch + image: cibuilds/hugo:0.62.1 + commands: + - set +o pipefail + - grep -l -r ecx.images-amazon.com content/ | sort | uniq | xargs -t --no-run-if-empty sed -ie "s/http:\/ / ecx.images-amazon.com/https:\/ / images-na.ssl-images-amazon.com/g" + - grep -l -r "http://www.amazon.co.jp/exec" content/ | sort | uniq | xargs -t --no-run-if-empty sed -i -e "s/http:\/ / www.amazon.co.jp\/exec/https:\/ / www.amazon.co.jp\/exec/g" + +trigger: + event: + - push