Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
⚙️ GitHub Action | Update Increment Version Code Logic
Browse files Browse the repository at this point in the history
  • Loading branch information
moondev03 authored Aug 6, 2024
1 parent a925ed9 commit f3ecf32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/versioning-and-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
id: update_version_code
run: |
# Get the current versionCode from build.gradle
VERSION_CODE=$(grep versionCode .Nabi/presentation/build.gradle.kts | sed 's/[^0-9]*//g')
VERSION_CODE=$(grep versionCode ./Nabi/presentation/build.gradle.kts | sed 's/[^0-9]*//g')
# Increment the versionCode
NEW_VERSION_CODE=$((VERSION_CODE + 1))
# Replace the old versionCode with the new one in build.gradle
sed -i "s/versionCode $VERSION_CODE/versionCode $NEW_VERSION_CODE/" .Nabi/presentation/build.gradle.kts
sed -i "s/versionCode $VERSION_CODE/versionCode $NEW_VERSION_CODE/" ./Nabi/presentation/build.gradle.kts
# Check if there are changes to commit
if [ $(git status --porcelain | wc -l) -gt 0 ]; then
Expand Down

0 comments on commit f3ecf32

Please sign in to comment.