Skip to content

Commit

Permalink
Only add the patch version if it is present
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrowlands committed Oct 26, 2023
1 parent 0bd6669 commit 748282e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/android-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ jobs:
- name: Extract existing version code
run: |
# Set new version name from tag
version_name=${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}
if [[ -z "${{ env.PATCH }}" ]]; then
version_name=${{ env.MAJOR }}.${{ env.MINOR }}
else
version_name=${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}
fi
# Get existing version code from build.gradle
version_code=$(grep "versionCode" networksurvey/build.gradle | awk '{print $2}' | tr -d '\n')
Expand Down

0 comments on commit 748282e

Please sign in to comment.