refactor: move delete artifacts fn in helper for android lane
This commit is contained in:
parent
289802d9bc
commit
4021345e0a
@ -50,9 +50,7 @@ module Fastlane
|
|||||||
|
|
||||||
# Delete artifacts files
|
# Delete artifacts files
|
||||||
artifacts = ['android_keys.zip', 'key.jks', 'key.properties', 'service_account_key.json']
|
artifacts = ['android_keys.zip', 'key.jks', 'key.properties', 'service_account_key.json']
|
||||||
artifacts.each do |file|
|
Helper::AndroidCdHelper.delete_artifacts(artifacts)
|
||||||
File.delete(file) if File.exist?(file)
|
|
||||||
end
|
|
||||||
|
|
||||||
UI.success('🍺 Successfully build & deploy appbundle to Google Play Store')
|
UI.success('🍺 Successfully build & deploy appbundle to Google Play Store')
|
||||||
end
|
end
|
||||||
|
@ -26,6 +26,13 @@ module Fastlane
|
|||||||
str_variable = variable.strip if variable.class.to_s == "String"
|
str_variable = variable.strip if variable.class.to_s == "String"
|
||||||
variable && !(str_variable.nil? || str_variable.empty?)
|
variable && !(str_variable.nil? || str_variable.empty?)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Delete built files
|
||||||
|
def self.delete_artifacts(artifacts)
|
||||||
|
artifacts.each do |file|
|
||||||
|
File.delete(file) if File.exist?(file)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user