From 07fe6a9a4bd1a08ac0f0760749ae5dd03ee47405 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Sat, 7 Oct 2023 17:26:57 -0300 Subject: [PATCH] Use sed --- .woodpecker.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 3a5c125..c83f73c 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -10,9 +10,7 @@ steps: - git remote set-url origin "https://$${CBTOKEN}@git.slc.ar/slococo/calsais.git" - git config --local user.name "$(git log --format=%an | head -n 1)" - git config --local user.email "$(git log --format=%ae | head -n 1)" - - shasum=$(sha256sum install.sh) - - oldShasum=$(perl -ne 'print if /^[[:alnum:]]{64}/' README.md) - - if ! [ "$shasum" = "$oldShasum" ]; then sed -i "s/$oldShasum/$shasum/" README.md; fi + - sed -i "s/^[A-Za-z0-9]\{64\}/$(sha256sum install.sh)/" README.md - if [ -z "$(git status --porcelain)" ]; then exit 0; fi - git add README.md - git commit -m "Update sha256sum"