Skip to content

Commit

Permalink
Merge pull request #207 from felixmeziere/add-codepush-and-appcenter-sdk
Browse files Browse the repository at this point in the history
fix(fastlane-setup): Fix backup file breaking Android build.
  • Loading branch information
Yann Leflour authored Jan 6, 2019
2 parents b64c1fa + 92e2e52 commit f300106
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 f300106

Please sign in to comment.