Skip to content

Instantly share code, notes, and snippets.

@revoreva
Last active January 14, 2021 13:09
Show Gist options
  • Save revoreva/68d9ae779b309c4bdc963a4ec204041b to your computer and use it in GitHub Desktop.
Save revoreva/68d9ae779b309c4bdc963a4ec204041b to your computer and use it in GitHub Desktop.
Generate Plist, values from Environment Variables
productionKeysContent = "" +
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n" +
"<plist version=\"1.0\">\n" +
" <dict>\n" +
" <key>monitoring_token</key>" + "\n" +
" <string>" + ENV['monitoring_token'] + "</string>" + "\n" +
" <key>third_party_key</key>" + "\n" +
" <string>" + ENV['third_party_key'] + "</string>" + "\n" +
" </dict>\n" +
"</plist>"
File.open("Plist/Keys.plist", "w") {|f| f.write(productionKeysContent) }
@revoreva
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment