From 0f25636f23b4d536087ca99def80518b8a2fe9b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= <jeremy@derusse.com>
Date: Fri, 8 Dec 2023 17:07:40 +0100
Subject: [PATCH] Add a test to assert branch-alias is well defined (#1610)

---
 .github/workflows/branch_alias.yml | 76 ------------------------------
 composer.json                      |  2 +-
 2 files changed, 1 insertion(+), 77 deletions(-)
 delete mode 100644 .github/workflows/branch_alias.yml

diff --git a/.github/workflows/branch_alias.yml b/.github/workflows/branch_alias.yml
deleted file mode 100644
index e07d411..0000000
--- a/.github/workflows/branch_alias.yml
+++ /dev/null
@@ -1,76 +0,0 @@
-name: Update branch alias
-
-on:
-  push:
-    tags: ['*']
-
-jobs:
-  branch-alias:
-    name: Update branch alias
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Set up PHP
-        uses: shivammathur/setup-php@v2
-        with:
-          php-version: 8.1
-          coverage: none
-
-      - name: Find branch alias
-        id: find_alias
-        run: |
-          TAG=$(echo $GITHUB_REF | cut -d'/' -f 3)
-          echo "Last tag was $TAG"
-          ARR=(${TAG//./ })
-          ARR[1]=$((${ARR[1]}+1))
-          echo "alias=${ARR[0]}.${ARR[1]}" >> $GITHUB_OUTPUT
-
-      - name: Checkout main repo
-        run: |
-          git clone --branch master https://${{ secrets.BOT_GITHUB_TOKEN }}:x-oauth-basic@github.com/async-aws/aws aws
-
-      - name: Update branch alias
-        run: |
-          cd aws/src/Service/RdsDataService
-          CURRENT_ALIAS=$(composer config extra.branch-alias.dev-master | cut -d'-' -f 1)
-
-          # If there is a current value on the branch alias
-          if [ ! -z $CURRENT_ALIAS ]; then
-            NEW_ALIAS=${{ steps.find_alias.outputs.alias }}
-            CURRENT_ARR=(${CURRENT_ALIAS//./ })
-            NEW_ARR=(${NEW_ALIAS//./ })
-
-            if [ ${CURRENT_ARR[0]} -gt ${NEW_ARR[0]} ]; then
-                echo "The current value for major version is larger"
-                exit 1;
-            fi
-
-            if [ ${CURRENT_ARR[0]} -eq ${NEW_ARR[0]} ] && [ ${CURRENT_ARR[1]} -gt ${NEW_ARR[1]} ]; then
-                echo "The current value for minor version is larger"
-                exit 1;
-            fi
-          fi
-
-          composer config extra.branch-alias.dev-master ${{ steps.find_alias.outputs.alias }}-dev
-
-      - name: Commit & push the new files
-        run: |
-          echo "::group::git status"
-          cd aws
-          git status
-          echo "::endgroup::"
-
-          git add -N .
-          if [[ $(git diff --numstat | wc -l) -eq 0 ]]; then
-            echo "No changes found. Exiting."
-            exit 0;
-          fi
-
-          git config --local user.email "github@async-aws.com"
-          git config --local user.name "AsyncAws Bot"
-
-          echo "::group::git push"
-          git add .
-          git commit -m "Update branch alias"
-          git push
-          echo "::endgroup::"
diff --git a/composer.json b/composer.json
index a69c411..5578a40 100644
--- a/composer.json
+++ b/composer.json
@@ -29,7 +29,7 @@
     },
     "extra": {
         "branch-alias": {
-            "dev-master": "2.1-dev"
+            "dev-master": "2.0-dev"
         }
     }
 }