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