From 41db69ee7aeb5805eba2bb45ec5925695c9c5d4d Mon Sep 17 00:00:00 2001 From: Mohamed Marrouchi Date: Tue, 10 Dec 2024 12:39:49 +0100 Subject: [PATCH] build: v2.1.0 --- bump-version.sh | 15 +++++++++++++-- package.json | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/bump-version.sh b/bump-version.sh index 194a0085..fe60afd4 100755 --- a/bump-version.sh +++ b/bump-version.sh @@ -28,13 +28,24 @@ elif [[ "$RELEASE_TYPE" == "minor" ]]; then fi # Retrieve the new version from package.json -NEW_VERSION=$(jq -r '.version' "$ROOT_DIR/package.json") +NEW_VERSION=$(jq -r '.version' "$ROOT_DIR/api/package.json") if [ -z "$NEW_VERSION" ]; then - echo "Failed to retrieve the version from package.json." + echo "Failed to retrieve the version from api/package.json." exit 1 fi +# Function to update version in a package.json +update_version() { + local file=$1 + echo "Updating version in $file to $NEW_VERSION" + jq --arg newVersion "$NEW_VERSION" '.version = $newVersion' "$file" > tmp.$$.json && mv tmp.$$.json "$file" +} + +# Update root package.json +if [[ -f "$ROOT_DIR/package.json" ]]; then + update_version "$ROOT_DIR/package.json" +fi # Commit and push changes echo "Committing and pushing changes..." diff --git a/package.json b/package.json index 46cefdfa..e7119d8e 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "frontend", "widget" ], - "version": "2.0.17", + "version": "2.1.0", "description": "Hexabot is a solution for creating and managing chatbots across multiple channels, leveraging AI for advanced conversational capabilities. It provides a user-friendly interface for building, training, and deploying chatbots with integrated support for various messaging platforms.", "author": "Hexastack", "license": "AGPL-3.0-only",