Skip to content

Commit

Permalink
fix(fastlane-setup): Fix backup file breaking Android build.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmeziere committed Jan 4, 2019
1 parent b64c1fa commit 92e2e52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generators/fastlane-setup/templates/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 92e2e52

Please sign in to comment.