diff --git a/.github/workflows/sendAppToQaAfterMergeStageQa.yml b/.github/workflows/sendAppToQaAfterMergeStageQa.yml index 84225e30..853d8f9c 100644 --- a/.github/workflows/sendAppToQaAfterMergeStageQa.yml +++ b/.github/workflows/sendAppToQaAfterMergeStageQa.yml @@ -1,11 +1,11 @@ name: Build and sent to QA stageQa on: - # Triggers the workflow when pull request closed events but only for the "dev" branch + # Triggers the workflow when pull request closed pull_request: types: - closed - branches: [ "dev" ] + workflow_dispatch: @@ -29,7 +29,7 @@ jobs: run: | echo "$CREDENTIAL_FILE_CONTENT" > ./app/serviceCredentialsFile.json echo "App type: stageQa" >> ./app/src/releaseNotes.txt - echo "buildNumber=${GITHUB_RUN_NUMBER}" >> ./app/src/releaseNotes.txt + echo "buildNumber==${GITHUB_SHA::7}">> ./app/src/releaseNotes.txt ./gradlew appDistributionToQaStageQa - name: Check status diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 7e135d21..90d06e54 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -23,8 +23,8 @@ android { applicationId = "app.cashadvisor" minSdk = 23 targetSdk = 34 - versionCode = getReleaseVersionCode() - versionName = "$versionCode" + versionCode = 1 + versionName = "1.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" initVKID() @@ -223,8 +223,4 @@ fun ApplicationDefaultConfig.initVKID() { ) ) } -fun getReleaseVersionCode(): Int { - val process = Runtime.getRuntime().exec("git rev-list --count HEAD") - val commitCount = process.inputStream.bufferedReader().use { it.readLine()?.toInt() ?: 0 } - return commitCount + 1 -} +