release script

This commit is contained in:
Ulf Gebhardt 2021-08-20 16:57:03 +02:00
parent 5034464ffd
commit 91123e27a3
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD

25
scripts/release.sh Executable file
View File

@ -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}