Skip to content

Commit

Permalink
Fix versionCode extraction for Actions
Browse files Browse the repository at this point in the history
Return the first entry found for versionCode

Signed-off-by: IacobIonut01 <[email protected]>
  • Loading branch information
IacobIonut01 committed Nov 16, 2024
1 parent 69d53b8 commit e5989be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get versionCode
id: versioncode
run: echo "versionCode=$(grep 'versionCode' app/build.gradle.kts | awk '{ print $3 }')" >> $GITHUB_OUTPUT
run: echo "versionCode=$(grep 'versionCode' app/build.gradle.kts | awk '{ print $3 }' | head -n 1)" >> $GITHUB_OUTPUT
- name: Get versionName
id: versionname
run: echo "versionName=$(grep 'versionName' app/build.gradle.kts | head -1 | awk -F\" '{ print $2 }')" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get versionCode
id: versioncode
run: echo "versionCode=$(grep 'versionCode' app/build.gradle.kts | awk '{ print $3 }')" >> $GITHUB_OUTPUT
run: echo "versionCode=$(grep 'versionCode' app/build.gradle.kts | awk '{ print $3 }' | head -n 1)" >> $GITHUB_OUTPUT
- name: Get versionName
id: versionname
run: echo "versionName=$(grep 'versionName' app/build.gradle.kts | head -1 | awk -F\" '{ print $2 }')" >> $GITHUB_OUTPUT
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get versionCode
id: versioncode
run: echo "versionCode=$(grep 'versionCode' app/build.gradle.kts | awk '{ print $3 }')" >> $GITHUB_OUTPUT
run: echo "versionCode=$(grep 'versionCode' app/build.gradle.kts | awk '{ print $3 }' | head -n 1)" >> $GITHUB_OUTPUT
- name: Get versionName
id: versionname
run: echo "versionName=$(grep 'versionName' app/build.gradle.kts | head -1 | awk -F\" '{ print $2 }')" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get versionCode
id: versioncode
run: echo "versionCode=$(grep 'versionCode' app/build.gradle.kts | awk '{ print $3 }')" >> $GITHUB_OUTPUT
run: echo "versionCode=$(grep 'versionCode' app/build.gradle.kts | awk '{ print $3 }' | head -n 1)" >> $GITHUB_OUTPUT
- name: Get versionName
id: versionname
run: echo "versionName=$(grep 'versionName' app/build.gradle.kts | head -1 | awk -F\" '{ print $2 }')" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit e5989be

Please sign in to comment.