Skip to content

Commit

Permalink
chore: Update versioning and release notes generation
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
niyajali committed Jan 14, 2025
1 parent 5232422 commit 8d5514b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions fastlane/FastFile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ platform :android do
)

# Generate Release Note
releaseNotes = generateFullReleaseNote()
releaseNotes = generateReleaseNote()

buildAndSignApp(
taskName: "assembleProd",
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8d5514b

Please sign in to comment.