Skip to content

Commit

Permalink
Merge pull request #7 from shopware/feat/set-composer-root-version
Browse files Browse the repository at this point in the history
feat: set COMPOSER_ROOT_VERSION
  • Loading branch information
mkraeml authored Oct 15, 2024
2 parents 9a52090 + f194960 commit 531e4c5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
description: "PHP extensions to install"
required: true
default: ""
composer-root-version:
description: "The COMPOSER_ROOT_VERSION that should be set"
required: false
default: ".auto"
install:
description: "Install Shopware"
required: true
Expand Down Expand Up @@ -72,6 +76,16 @@ runs:
ref: ${{ inputs.shopware-version }}
path: ${{ inputs.path }}

- name: Set COMPOSER_ROOT_VERSION
shell: bash
working-directory: ${{ inputs.path }}
run: |
if [[ "${{ inputs.composer-root-version }}" == ".auto" ]]; then
echo "COMPOSER_ROOT_VERSION=$(jq -r '.extra | .["branch-alias"] | .["dev-trunk"]' composer.json)" >> "$GITHUB_ENV"
else
echo "COMPOSER_ROOT_VERSION=${{ inputs.composer-root-version }}" >> "$GITHUB_ENV"
fi
- name: Remove vendor-bin
if: inputs.keep-composer-tools == 'false'
shell: bash
Expand Down

0 comments on commit 531e4c5

Please sign in to comment.