From 3d850c355f6ef101d345acb733c39b886163f791 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 20 Aug 2024 13:41:31 +0200 Subject: [PATCH] fix: git pull fast-forward before pushing --- .github/workflows/package-version-creation.yml | 1 + scripts/update-app-info-version.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package-version-creation.yml b/.github/workflows/package-version-creation.yml index de9fe22..c08aa49 100644 --- a/.github/workflows/package-version-creation.yml +++ b/.github/workflows/package-version-creation.yml @@ -51,6 +51,7 @@ jobs: git status git config --global user.name 'GitHub Actions' git config --global user.email 'actions@github.com' + git config pull.ff only git pull origin "${{ github.head_ref }}" git add force-app/main/default/classes/AdyenOMSConstants.cls sfdx-project.json # Check if any of the files have been modified before committing diff --git a/scripts/update-app-info-version.sh b/scripts/update-app-info-version.sh index 971d9c5..3123ebb 100755 --- a/scripts/update-app-info-version.sh +++ b/scripts/update-app-info-version.sh @@ -18,16 +18,16 @@ PROJECT_LIBRARY_VERSION=$(yq -r '.packageDirectories[].dependencies[]? | select( APEX_OMS_VERSION=$(awk -F"[']" '/MERCHANT_APP_VERSION_FOR_APP_INFO/ {print $2}' "$APEX_FILE") APEX_LIBRARY_VERSION=$(awk -F"[']" '/ADYEN_LIBRARY_VERSION_FOR_APP_INFO/ {print $2}' "$APEX_FILE") +echo # Print the branch name echo "Branch: $BRANCH_NAME" - # Print the headers for better comparison printf "%-25s %-25s\n" "sfdx-project.json VERSION" "AdyenOMSConstants VERSION" printf "%-25s %-25s\n" "-------------------------" "-------------------------" - # Print the OMS and Library versions in a pretty format printf "%-25s %-25s\n" "$PROJECT_OMS_VERSION (OMS)" "$APEX_OMS_VERSION (OMS)" printf "%-25s %-25s\n" "$PROJECT_LIBRARY_VERSION (Library)" "$APEX_LIBRARY_VERSION (Library)" +echo # Check if BASE_VERSION matches PROJECT_OMS_VERSION if [ "$BRANCH_VERSION" != "$PROJECT_OMS_VERSION" ]; then