📝 Update the ruby script to account for running it with Android only configuration.

This commit is contained in:
Salma ElTarzi 2017-08-31 16:03:18 +02:00
parent 16ccbcd1bf
commit 177cc852b1
2 changed files with 47 additions and 42 deletions

View File

@ -1,5 +1,10 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'xcodeproj' begin
require 'xcodeproj'
rescue LoadError
puts('xcodeproj doesn\'t exist')
Kernel.exit(0)
end
require 'fileutils' require 'fileutils'
# Replace these with your values # Replace these with your values

View File

@ -23,7 +23,7 @@
"homepage": "https://github.com/Instabug/instabug-reactnative#readme", "homepage": "https://github.com/Instabug/instabug-reactnative#readme",
"rnpm": { "rnpm": {
"commands": { "commands": {
"postlink": "ruby ./node_modules/instabug-reactnative/link.rb" "postlink": "ruby ./node_modules/instabug-reactnative/link.rb || echo \"Ruby doesn't exist, if you're building this for Android only, then feel free to ignore this error, otherwise please install Ruby and run 'react-native link instabug-reactnative' again\""
}, },
"android": { "android": {
"packageInstance": "\t\tnew RNInstabugReactnativePackage.Builder(\"YOUR_ANDROID_APPLICATION_TOKEN\",MainApplication.this)\n\t\t\t\t\t\t\t.setInvocationEvent(\"shake\")\n\t\t\t\t\t\t\t.setPrimaryColor(\"#1D82DC\")\n\t\t\t\t\t\t\t.setFloatingEdge(\"left\")\n\t\t\t\t\t\t\t.setFloatingButtonOffsetFromTop(250)\n\t\t\t\t\t\t\t.build()" "packageInstance": "\t\tnew RNInstabugReactnativePackage.Builder(\"YOUR_ANDROID_APPLICATION_TOKEN\",MainApplication.this)\n\t\t\t\t\t\t\t.setInvocationEvent(\"shake\")\n\t\t\t\t\t\t\t.setPrimaryColor(\"#1D82DC\")\n\t\t\t\t\t\t\t.setFloatingEdge(\"left\")\n\t\t\t\t\t\t\t.setFloatingButtonOffsetFromTop(250)\n\t\t\t\t\t\t\t.build()"