diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 3e75066b..9b39218c 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -54,6 +54,11 @@ 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, @@ -61,11 +66,6 @@ platform :android do 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) @@ -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"