From 8d5514b0ea302fd5201a8757c7ad93056e2c609f Mon Sep 17 00:00:00 2001 From: Sk Niyaj Ali Date: Tue, 14 Jan 2025 18:52:15 +0530 Subject: [PATCH] chore: Update versioning and release notes generation - Updated version setting to use a fallback value of "1.0.0" if version.txt is not found. - Switched from `generateFullReleaseNote` to `generateReleaseNote` for release note generation in both playstore and internal lanes. - Modified `generateReleaseNote` to consider the last 3 commits for release notes instead of just 1. - Changed the return value of `updateVersions` to only return the version string. --- fastlane/FastFile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/fastlane/FastFile b/fastlane/FastFile index 5390ae632..590331349 100644 --- a/fastlane/FastFile +++ b/fastlane/FastFile @@ -68,7 +68,7 @@ platform :android do ) # Generate Release Note - releaseNotes = generateFullReleaseNote() + releaseNotes = generateReleaseNote() buildAndSignApp( taskName: "assembleProd", @@ -144,7 +144,7 @@ platform :android do ) # Generate Release Note - releaseNotes = generateFullReleaseNote() + releaseNotes = generateReleaseNote() # Write the generated release notes to default.txt buildConfigPath = "metadata/android/en-US/changelogs/default.txt" @@ -234,7 +234,8 @@ platform :android do gradle(tasks: ["versionFile"]) # Set version from file with fallback - ENV['VERSION'] = File.read("../version.txt").strip rescue "1.0.0" + version = File.read("../version.txt").strip rescue "1.0.0" + ENV['VERSION'] = version case platform when 'playstore' @@ -286,16 +287,13 @@ platform :android do UI.success("Set VERSION=#{ENV['VERSION']} VERSION_CODE=#{ENV['VERSION_CODE']}") # Return the values for potential further use - { - version: ENV['VERSION'], - version_code: ENV['VERSION_CODE'] - } + version end desc "Generate release notes" lane :generateReleaseNote do |options| releaseNotes = changelog_from_git_commits( - commits_count: 1, + commits_count: 3, ) releaseNotes end