Skip to content

Commit

Permalink
Fix fastlane publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
grote committed Jan 15, 2024
1 parent 056c6b4 commit 2a7823a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ platform :android do
changelog = File.read("metadata/android/en-US/changelogs/#{version_code}.txt")
puts "Changelog:\n" + changelog

# Build
gradle(task: "assemble", build_type: "Release")
apk = lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]
puts "APK: " + apk

# Tag release
add_git_tag(
tag: version_name,
message: changelog,
sign: true
)

# Build
gradle(task: "assemble", build_type: "Release")
apk = lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]
puts "APK: " + apk

# Github: Ensure that tag exists and push it
git_tag_exists(tag: version_name)
push_git_tags(tag: version_name)
Expand All @@ -88,8 +88,8 @@ platform :android do
system "cp #{apk} #{fdroid_repo}/repo/#{package_name}_#{version_code}.apk"

# F-Droid: set current version to releasae
system "sed -i 's/^Current Version:.*$/Current Version:#{version_name}/' #{fdroid_repo}/metadata/#{package_name}.yml"
system "sed -i 's/^Current Version Code:.*$/Current Version Code:#{version_code}/' #{fdroid_repo}/metadata/#{package_name}.yml"
system "sed -i 's/^CurrentVersion:.*$/CurrentVersion: #{version_name}/' #{fdroid_repo}/metadata/#{package_name}.yml"
system "sed -i 's/^CurrentVersionCode:.*$/CurrentVersionCode: #{version_code}/' #{fdroid_repo}/metadata/#{package_name}.yml"

# F-Droid: publish repo update
system "cd #{fdroid_repo} && fdroid update -v"
Expand Down

0 comments on commit 2a7823a

Please sign in to comment.