From cf23ac0c3c7a356cd63b3921c8d2e39bf0950ecf Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Mon, 13 Nov 2023 08:44:49 +0100 Subject: [PATCH] Fix paths for version check (#2816) Fix updating the `version.json` file. Issue was relative path while it must be absolute. ref #2748 --- .woodpecker/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.woodpecker/docs.yml b/.woodpecker/docs.yml index 674096710..a6c055d60 100644 --- a/.woodpecker/docs.yml +++ b/.woodpecker/docs.yml @@ -75,8 +75,8 @@ steps: - git config --global user.name "woodpecker-bot" - git clone --depth 1 --single-branch git@github.com:woodpecker-ci/woodpecker-ci.github.io.git /repo # update latest and next version - - if [ "$CI_PIPELINE_EVENT" == "tag" ] ; then jq '.latest = ${CI_COMMIT_TAG}' repo/version.json > repo/version.json.tmp && mv repo/version.json.tmp repo/version.json ; fi - - if [ "$CI_PIPELINE_EVENT" == "push" ] ; then jq "next-" '.next = ${CI_COMMIT_SHA:0:10}' repo/version.json > repo/version.json.tmp && mv repo/version.json.tmp repo/version.json ; fi + - if [ "$CI_PIPELINE_EVENT" == "tag" ] ; then jq '.latest = ${CI_COMMIT_TAG}' /repo/version.json > /repo/version.json.tmp && mv /repo/version.json.tmp /repo/version.json ; fi + - if [ "$CI_PIPELINE_EVENT" == "push" ] ; then jq "next-" '.next = ${CI_COMMIT_SHA:0:10}' /repo/version.json > /repo/version.json.tmp && mv /repo/version.json.tmp /repo/version.json ; fi # copy all docs files and delete all old ones, but leave CNAME and index.yaml untouched - rsync -r --exclude .git --exclude CNAME --exclude index.yaml --exclude README.md --exclude version.json --delete docs/build/ /repo - cd /repo