Skip to content

Commit

Permalink
Build debug script improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
DHD2280 committed Dec 4, 2024
1 parent c08d78a commit 20356e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: chmod +x gradlew

- name: Get application version name
run: echo "VERSION_NAME=$(($(cat app/build.gradle.kts | grep versionCode | tr -s ' ' | cut -d " " -f 4 | tr -d '\r')))" >> $GITHUB_ENV
run: echo "VERSION_NAME=$(${{github.workspace}}/gradlew -q printVersionName)" >> $GITHUB_ENV

- name: Bump application version code
uses: chkfung/[email protected]
Expand Down
4 changes: 4 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,8 @@ dependencies {
// Media 3
implementation(libs.androidx.media3.exoplayer)
implementation (libs.androidx.media3.common)
}

tasks.register("printVersionName") {
println(android.defaultConfig.versionName?.replace(".debug".toRegex(), ""))
}

0 comments on commit 20356e0

Please sign in to comment.