File tree 1 file changed +13
-9
lines changed
1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -797,16 +797,20 @@ def apk(self, args):
797
797
798
798
if not apk_file :
799
799
info_main ('# APK filename not found in build output, trying to guess' )
800
- suffix = args .build_mode
801
- if suffix == 'release' and not args .keystore :
802
- suffix = suffix + '-unsigned'
803
- apks = glob .glob (join (apk_dir , apk_glob .format (suffix )))
804
- if len (apks ) == 0 :
800
+ if args .build_mode == "release" :
801
+ suffixes = ("release" , "release-unsigned" )
802
+ else :
803
+ suffixes = ("debug" , )
804
+ for suffix in suffixes :
805
+ apks = glob .glob (join (apk_dir , apk_glob .format (suffix )))
806
+ if apks :
807
+ if len (apks ) > 1 :
808
+ info ('More than one built APK found... guessing you '
809
+ 'just built {}' .format (apks [- 1 ]))
810
+ apk_file = apks [- 1 ]
811
+ break
812
+ else :
805
813
raise ValueError ('Couldn\' t find the built APK' )
806
- if len (apks ) > 1 :
807
- info ('More than one built APK found... guessing you '
808
- 'just built {}' .format (apks [- 1 ]))
809
- apk_file = apks [- 1 ]
810
814
811
815
info_main ('# Found APK file: {}' .format (apk_file ))
812
816
if apk_add_version :
You can’t perform that action at this time.
0 commit comments