From 240aa7fcd74b1414a9e696556e22692e2ea70353 Mon Sep 17 00:00:00 2001 From: Rick Henry Date: Wed, 13 Nov 2024 13:29:05 +0000 Subject: [PATCH] feat: update documentation in release scripts --- scripts/update_tags_and_docs.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/scripts/update_tags_and_docs.sh b/scripts/update_tags_and_docs.sh index a090452..30d6036 100755 --- a/scripts/update_tags_and_docs.sh +++ b/scripts/update_tags_and_docs.sh @@ -25,6 +25,22 @@ echo "Tag name: ${BOOKSTACK_VERSION}" git tag -s -a "${BOOKSTACK_VERSION}" -m "Release version ${BOOKSTACK_VERSION}" git push --tags -# TODO: Sort VERSION file -# TODO: Update README version -# TODO: Update docker-compose +echo "Extracting old version info.." +OLD_BS_VERSION="$(cat VERSION)" + +echo "Updating README and reference docker-compose.yml.." +sed \ + -i '' \ + -e "s/${OLD_BS_VERSION}/${BOOKSTACK_VERSION}/g" \ + "${GIT_ROOT}/README.md" \ + "${GIT_ROOT}/docker-compose.yml" + +echo "Updating VERSION file.." +echo "${BOOKSTACK_VERSION}" > "${GIT_ROOT}/VERSION" + +git add \ + "${GIT_ROOT}/README.md" \ + "${GIT_ROOT}/docker-compose.yml" \ + "${GIT_ROOT}/VERSION" + +git commit -S -m "doc: update documentation to reference ${BOOKSTACK_VERSION}"