Skip to content

Commit 1d566d1

Browse files
committed
code cleanup
Group the code related to parsing the `apk_output_file_path` parameter together
1 parent b28c1f0 commit 1d566d1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_generate_apk_from_aab.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,14 @@ def self.run(params)
1111
# Parse input parameters
1212
aab_file_path = parse_aab_param(params)
1313
apk_output_file_path = params[:apk_output_file_path] || Pathname(aab_file_path).sub_ext('.apk').to_s
14+
apk_output_file_path = File.join(apk_output_file_path, "#{File.basename(aab_file_path, '.aab')}.apk") if File.directory?(apk_output_file_path)
1415
code_sign_arguments = {
1516
'--ks': params[:keystore_path],
1617
'--ks-pass': params[:keystore_password],
1718
'--ks-key-alias': params[:keystore_key_alias],
1819
'--key-pass': params[:signing_key_password]
1920
}.compact.flatten.map(&:to_s)
2021

21-
if File.directory?(apk_output_file_path)
22-
apk_output_file_path = File.join(apk_output_file_path, "#{File.basename(aab_file_path, '.aab')}.apk")
23-
end
24-
2522
Dir.mktmpdir('a8c-release-toolkit-bundletool-') do |tmpdir|
2623
sh(
2724
'bundletool', 'build-apks',

0 commit comments

Comments
 (0)