Skip to content

Commit

Permalink
detect rn version
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Edney committed Jun 26, 2023
1 parent ea8d8ed commit e8f73ee
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ set rnVersionInt [string range $rnVersion 2 end]
# Replace underscore (_) with a period (.)
set rnVersionInt2 [string map {_ .} $rnVersionInt]

regsub -all [regexp_quote ".expo.ejected"] $rnVersionInt2 "" rnVersionInt3

# Convert float string to float value using bc
regsub -all {^0+} $rnVersionInt2 "" $rnVersionInt2
regsub -all {^0+} $rnVersionInt3 "" $rnVersionInt3

puts "Using notifier version: $notifierVersion"
puts "Using React Native version: $rnVersion"
Expand Down Expand Up @@ -59,7 +61,7 @@ send -- y
expect "If you want the latest version of @bugsnag/cli hit enter, otherwise type the version you want"
send -- latest\r

if {[expr $rnVersionInt2 < 0.68]} {
if {[expr $rnVersionInt3 < 0.68]} {
expect "or follow the manual integration instructions in our online docs: https://docs.bugsnag.com/platforms/react-native/react-native/manual-setup/')"
send -- \r
}
Expand Down

0 comments on commit e8f73ee

Please sign in to comment.