From 91123e27a34aa3e76f9cdcf554d3b686304f29dd Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 20 Aug 2021 16:57:03 +0200 Subject: [PATCH] release script --- scripts/release.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 scripts/release.sh diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 000000000..f3a223e78 --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# find directories +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +PROJECT_DIR="${SCRIPT_DIR}/../" +FRONTEND_DIR="${PROJECT_DIR}/frontend/" +BACKEND_DIR="${PROJECT_DIR}/backend/" + +# navigate to project directory +cd ${PROJECT_DIR} + +# ask for new version +yarn version --no-git-tag-version --no-commit-hooks --no-commit + +# find new version +VERSION="$(node -p -e "require('./package.json').version")" + +# update version in sub projects +cd ${FRONTEND_DIR} +yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version ${VERSION} +cd ${BACKEND_DIR} +yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version ${VERSION} + +# generate changelog +auto-changelog --latest-version ${VERSION} \ No newline at end of file