From 8663cab0fe0d787b556d495ec5164cf84108a739 Mon Sep 17 00:00:00 2001 From: daniloc Date: Fri, 16 Aug 2024 16:13:39 +0200 Subject: [PATCH] fix: branch version is the destination not source branch --- scripts/update-app-info-version.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/update-app-info-version.sh b/scripts/update-app-info-version.sh index a4d147f..6752a9c 100644 --- a/scripts/update-app-info-version.sh +++ b/scripts/update-app-info-version.sh @@ -1,8 +1,10 @@ #!/bin/bash # Extract version from branch name -BRANCH_NAME=${GITHUB_REF##*/} -VERSION=${BRANCH_NAME#release/} +DESTINATION_BRANCH=$(jq -r .pull_request.base.ref < "${GITHUB_EVENT_PATH}") +echo "Destination branch: $DESTINATION_BRANCH" + +VERSION=${DESTINATION_BRANCH#release/} # Remove the last number from the version (e.g., 3.0.0.1 -> 3.0.0) BRANCH_VERSION=${VERSION%.*}