diff --git a/.github/workflows/branch_alias.yml b/.github/workflows/branch_alias.yml deleted file mode 100644 index e1c3288..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/Integration/Aws/SimpleS3 - 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 a56241c..40bb3c2 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.0-dev" } } }