diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 85dd7026c74..2d0729d675c 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -28,6 +28,13 @@ jobs: runs-on: ubuntu-latest steps: + - name: Create version + run: | + TAG=${{ github.ref_name }} + echo "VERSION=$(echo ${TAG#v} | cut -d "-" -f 1)" >> $GITHUB_ENV + echo "VERSION_TEXT=$(echo ${TAG#v} | cut -d "-" -s -f 2)" >> $GITHUB_ENV + shell: bash + - name: Clone uses: actions/checkout@v3 @@ -52,11 +59,12 @@ jobs: - name: Replace placeholder run: | - sed -i 's=___VERSION___=${{ github.ref_name }}=g' engine/Shopware/Kernel.php - sed -i 's=___VERSION_TEXT___= =g' engine/Shopware/Kernel.php + sed -i 's=___VERSION___=${{ env.VERSION }}=g' engine/Shopware/Kernel.php + sed -i 's=___VERSION_TEXT___=${{ env.VERSION_TEXT }}=g' engine/Shopware/Kernel.php sed -i 's=___REVISION___=${{ env.REVISION }}=g' engine/Shopware/Kernel.php - sed -i 's=___VERSION___=${{ github.ref_name }}=g' recovery/install/data/version - sed -i 's=___VERSION_TEXT___= =g' recovery/install/data/version + sed -i 's=___VERSION___=${{ env.VERSION }}=g' recovery/install/data/version + sed -i 's=___VERSION_TEXT___=${{ env.VERSION_TEXT }}=g' recovery/install/data/version + shell: bash - name: Create hash files run: | diff --git a/.github/workflows/create-update.yml b/.github/workflows/create-update.yml index b44a9ef3e76..ae8610e42ec 100644 --- a/.github/workflows/create-update.yml +++ b/.github/workflows/create-update.yml @@ -18,6 +18,13 @@ jobs: runs-on: ubuntu-latest steps: + - name: Create version + run: | + TAG=${{ github.ref_name }} + echo "VERSION=$(echo ${TAG#v} | cut -d "-" -f 1)" >> $GITHUB_ENV + echo "VERSION_TEXT=$(echo ${TAG#v} | cut -d "-" -s -f 2)" >> $GITHUB_ENV + shell: bash + - name: Clone uses: actions/checkout@v3 @@ -52,11 +59,12 @@ jobs: - name: Replace placeholder run: | - sed -i 's=___VERSION___=${{ github.ref_name }}=g' ./engine/Shopware/Kernel.php - sed -i 's=___VERSION_TEXT___= =g' ./engine/Shopware/Kernel.php - sed -i 's=___REVISION___=${{ env.REVISION }}=g' ./engine/Shopware/Kernel.php - sed -i 's=___VERSION___=${{ github.ref_name }}=g' ./recovery/install/data/version - sed -i 's=___VERSION_TEXT___= =g' ./recovery/install/data/version + sed -i 's=___VERSION___=${{ env.VERSION }}=g' engine/Shopware/Kernel.php + sed -i 's=___VERSION_TEXT___=${{ env.VERSION_TEXT }}=g' engine/Shopware/Kernel.php + sed -i 's=___REVISION___=${{ env.REVISION }}=g' engine/Shopware/Kernel.php + sed -i 's=___VERSION___=${{ env.VERSION }}=g' recovery/install/data/version + sed -i 's=___VERSION_TEXT___=${{ env.VERSION_TEXT }}=g' recovery/install/data/version + shell: bash - name: Create update asset dir run: |