From 92e2e52a8f82a9afbe3dddcb85309f61a29ee4e4 Mon Sep 17 00:00:00 2001 From: Felix Meziere Date: Fri, 4 Jan 2019 16:26:10 +0000 Subject: [PATCH] fix(fastlane-setup): Fix backup file breaking Android build. --- generators/fastlane-setup/templates/fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/fastlane-setup/templates/fastlane/Fastfile b/generators/fastlane-setup/templates/fastlane/Fastfile index 529a3c6..6ecd257 100644 --- a/generators/fastlane-setup/templates/fastlane/Fastfile +++ b/generators/fastlane-setup/templates/fastlane/Fastfile @@ -212,7 +212,7 @@ platform :android do end if ENV['ANDROID_CODEPUSH_DEPLOYMENT_KEY'] then android_strings_path = "#{ENV['ANDROID_PROJECT_DIR']}/app/src/main/res/values/strings.xml" - backup_file(path: android_strings_path) + # backup_file(path: android_strings_path) We can't backup this way because android can't build if there is a non-xml file in values folder. Solution to be found. xml = Nokogiri::XML(File.open("../#{android_strings_path}")) xml.at("//string[@name=\"reactNativeCodePush_androidDeploymentKey\"]").content = ENV['ANDROID_CODEPUSH_DEPLOYMENT_KEY'] File.write("../#{android_strings_path}", xml.to_xml)