Skip to content

Commit

Permalink
Merge pull request #2543 from shopware5/sw-27141/adjust-release-and-u…
Browse files Browse the repository at this point in the history
…pdate-ci

ci(SW-27141): adjust release and update tag name
  • Loading branch information
mitelg committed Jun 27, 2023
2 parents ca30e2a + a998131 commit 95e7715
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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: |
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/create-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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: |
Expand Down

0 comments on commit 95e7715

Please sign in to comment.