From 0642e3f89e760d26ff6ad587a0d2f3c2f9ad32ec Mon Sep 17 00:00:00 2001 From: Julian Raufelder Date: Mon, 22 Feb 2021 16:35:52 +0100 Subject: [PATCH] Fix branch when creating draft GitHub release using Fastlane [ci skip] --- fastlane/Fastfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 54e77a52..d9c1053e 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -5,9 +5,7 @@ fastlane_require 'net/sftp' default_platform(:android) -branch_name = `git rev-parse --abbrev-ref HEAD` -build = `git rev-list --count #{branch_name} | tr -d " \t\n\r"` -build = build.to_i + 1958 # adding 1958 for legacy reasons. Must be in sync with getVersionCode() from build.gradle +build = number_of_commits + 1958 # adding 1958 for legacy reasons. Must be in sync with getVersionCode() from build.gradle version = get_version_name( gradle_file_path:"build.gradle", ext_constant_name:"androidVersionName") @@ -188,7 +186,7 @@ platform :android do |options| prerelease = false if options[:beta] - target_branch = "release/#{version}" + target_branch = git_branch prerelease = true end