From caa62a5ddbbabfa4593a708e2c976121741b0da4 Mon Sep 17 00:00:00 2001 From: Greg Hale Date: Wed, 15 Jan 2025 13:11:03 -0800 Subject: [PATCH] delete old version bumping scripts (#1337) @aaronvg Could you please check for me that we don't use these scripts anymore? ---- > [!IMPORTANT] > Remove old version bumping scripts `version-bump-release.sh` and `version-bump.sh`. > > - **Scripts Deleted**: > - Removed `version-bump-release.sh` from `release` directory. > - Removed `version-bump.sh` from `release` directory. > > This description was created by [Ellipsis](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral) for 149749203bc4cb5024fb9c6619d406c4db5614a6. It will automatically update as commits are pushed. --- release/version-bump-release.sh | 113 -------------------------------- release/version-bump.sh | 79 ---------------------- 2 files changed, 192 deletions(-) delete mode 100755 release/version-bump-release.sh delete mode 100755 release/version-bump.sh diff --git a/release/version-bump-release.sh b/release/version-bump-release.sh deleted file mode 100755 index bb867981f..000000000 --- a/release/version-bump-release.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/sh - -set -e - - -CURRENT_BRANCH=$(git branch --show-current) -if [[ "${CURRENT_BRANCH}" != "canary" ]]; then - echo "You are not on the 'canary' branch. Please switch to the 'canary' branch before proceeding." - exit 1 -fi -git fetch origin > /dev/null 2>&1 -if [[ $(git diff --stat) != '' ]]; then - echo "Your repo is dirty. Please commit your changes before bumping the version." - exit 1 -fi -if [[ $(git diff --stat origin/${CURRENT_BRANCH}) != '' ]]; then - echo "Your branch is not in sync with origin. Please sync before bumping the version." - exit 1 -fi - -for COMPONENT in "CLI" "Python Client" "VSCode Extension"; do - if [[ "${COMPONENT}" == "VSCode Extension" ]]; then - echo "Release ${COMPONENT}? [Y/N]:" - read PATCH_VERSION - if [[ "${PATCH_VERSION}" =~ ^[Yy]$ ]]; then - VSCODE_EXT="minor" - else - VSCODE_EXT="none" - fi - else - echo "Release ${COMPONENT}? [Y/N]:" - read PRERELEASE_VERSION - if [[ "${PRERELEASE_VERSION}" =~ ^[Yy]$ ]]; then - if [[ "${COMPONENT}" == "CLI" ]]; then - CLI="minor" - elif [[ "${COMPONENT}" == "Python Client" ]]; then - CLIENT_PYTHON="minor" - fi - else - if [[ "${COMPONENT}" == "CLI" ]]; then - CLI="none" - elif [[ "${COMPONENT}" == "Python Client" ]]; then - CLIENT_PYTHON="none" - fi - fi - fi -done - -if [ "$CLI" != "none" ] || [ "$CLIENT_PYTHON" != "none" ] || [ "$VSCODE_EXT" != "none" ] -then - TIMESTAMP=$(date +%s%3N) - git checkout -b ${USER}/release-version/${TIMESTAMP} - - COMMIT_MSG="Release" - if [ "$CLI" != "none" ] - then - pushd engine - VERSION=$(bumpversion --allow-dirty pre --list | grep new_version | cut -d '=' -f 2) || exit 1 - cargo build - COMMIT_MSG="${COMMIT_MSG} [BUMP:cli:${VERSION}]" - popd - fi - - if [ "$CLIENT_PYTHON" != "none" ] - then - pushd clients/python - VERSION=$(bumpversion --allow-dirty pre --list | grep new_version | cut -d '=' -f 2) || exit 1 - COMMIT_MSG="${COMMIT_MSG} [BUMP:py_client:${VERSION}]" - popd - fi - - if [ "$VSCODE_EXT" != "none" ] - then - pushd typescript - VERSION=$(bumpversion --allow-dirty minor --list | grep new_version | cut -d '=' -f 2) || exit 1 - COMMIT_MSG="${COMMIT_MSG} [BUMP:vscode_ext:${VERSION}]" - popd - fi - - git commit -am "${COMMIT_MSG}" - - COMMIT_MSG="" - # Now bump up to the minor version - if [ "$CLI" != "none" ] - then - pushd engine - VERSION=$(bumpversion --allow-dirty minor --list | grep new_version | cut -d '=' -f 2) || exit 1 - cargo build - COMMIT_MSG="${COMMIT_MSG} [BUMP:cli:${VERSION}]" - popd - fi - - if [ "$CLIENT_PYTHON" != "none" ] - then - pushd clients/python - VERSION=$(bumpversion --allow-dirty minor --list | grep new_version | cut -d '=' -f 2) || exit 1 - COMMIT_MSG="${COMMIT_MSG} [BUMP:py_client:${VERSION}]" - popd - fi - - if [ "$VSCODE_EXT" != "none" ] - then - pushd typescript - VERSION=$(bumpversion --allow-dirty minor --list | grep new_version | cut -d '=' -f 2) || exit 1 - COMMIT_MSG="${COMMIT_MSG} [BUMP:vscode_ext:${VERSION}]" - popd - fi - git commit -am "${COMMIT_MSG}" - - gh pr create --title "${COMMIT_MSG}" --body "Automated flow to bump version${COMMIT_MSG}" - git checkout ${CURRENT_BRANCH} - git branch -D ${USER}/release-version/${TIMESTAMP} -fi diff --git a/release/version-bump.sh b/release/version-bump.sh deleted file mode 100755 index c7d22960f..000000000 --- a/release/version-bump.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh - -set -e - - -CURRENT_BRANCH=$(git branch --show-current) -git fetch origin > /dev/null 2>&1 -if [[ $(git diff --stat) != '' ]]; then - echo "Your repo is dirty. Please commit your changes before bumping the version." - exit 1 -fi -if [[ $(git diff --stat origin/${CURRENT_BRANCH}) != '' ]]; then - echo "Your branch is not in sync with origin. Please sync before bumping the version." - exit 1 -fi - -for COMPONENT in "CLI" "Python Client" "VSCode Extension"; do - if [[ "${COMPONENT}" == "VSCode Extension" ]]; then - echo "Set version type to 'patch' for ${COMPONENT}? [Y/N]:" - read PATCH_VERSION - if [[ "${PATCH_VERSION}" =~ ^[Yy]$ ]]; then - VSCODE_EXT="patch" - else - VSCODE_EXT="none" - fi - else - echo "Set version type to 'prerelease' for ${COMPONENT}? [Y/N]:" - read PRERELEASE_VERSION - if [[ "${PRERELEASE_VERSION}" =~ ^[Yy]$ ]]; then - if [[ "${COMPONENT}" == "CLI" ]]; then - CLI="prerelease" - elif [[ "${COMPONENT}" == "Python Client" ]]; then - CLIENT_PYTHON="prerelease" - fi - else - if [[ "${COMPONENT}" == "CLI" ]]; then - CLI="none" - elif [[ "${COMPONENT}" == "Python Client" ]]; then - CLIENT_PYTHON="none" - fi - fi - fi -done - -if [ "$CLI" != "none" ] || [ "$CLIENT_PYTHON" != "none" ] || [ "$VSCODE_EXT" != "none" ] -then - TIMESTAMP=$(date +%s%3N) - git checkout -b ${USER}/bump-version/${TIMESTAMP} - - if [ "$CLI" != "none" ] - then - pushd engine - VERSION=$(bumpversion --allow-dirty $CLI --list | grep new_version | cut -d '=' -f 2) || exit 1 - cargo build - COMMIT_MSG="${COMMIT_MSG} [BUMP:cli:${VERSION}]" - popd - fi - - if [ "$CLIENT_PYTHON" != "none" ] - then - pushd clients/python - VERSION=$(bumpversion --allow-dirty $CLIENT_PYTHON --list | grep new_version | cut -d '=' -f 2) || exit 1 - COMMIT_MSG="${COMMIT_MSG} [BUMP:py_client:${VERSION}]" - popd - fi - - if [ "$VSCODE_EXT" != "none" ] - then - pushd typescript - VERSION=$(bumpversion --allow-dirty $VSCODE_EXT --list | grep new_version | cut -d '=' -f 2) || exit 1 - COMMIT_MSG="${COMMIT_MSG} [BUMP:vscode_ext:${VERSION}]" - popd - fi - - git commit -am "${COMMIT_MSG}" - gh pr create --title "${COMMIT_MSG}" --body "Automated flow to bump version${COMMIT_MSG}" - git checkout ${CURRENT_BRANCH} - git branch -D ${USER}/bump-version/${TIMESTAMP} -fi