bump versions RN-> 0.29.2, Clojure/ClojureScript -> 1.8, Reagent -> 0.6.0-rc

- ReactNative server host updates had to be changed for 0.29.2: AppDelegate.m does not have host anymore, RegExp for host in RCTWebSocketExecutor.m had to be changed.
This commit is contained in:
Artur Girenko 2016-07-20 11:34:06 +02:00
parent 4a2c15f418
commit fc341e723b
2 changed files with 11 additions and 9 deletions

View File

@ -28,8 +28,9 @@ platformRx = /\$PLATFORM\$/g
devHostRx = /\$DEV_HOST\$/g
ipAddressRx = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/i
figwheelUrlRx = /ws:\/\/[0-9a-zA-Z\.]*:/g
serverRx = /http:\/\/[^:]+/g
rnVersion = '0.27.2'
appDelegateRx = /http:\/\/[^:]+/g
debugHostRx = /host\s+=\s+@".*";/g
rnVersion = '0.29.2'
rnPackagerPort = 8081
process.title = 're-natal'
interfaceConf =
@ -53,7 +54,7 @@ interfaceConf =
android: ["core.cljs"]
common: ["handlers.cljs", "subs.cljs", "db.cljs"]
other: [["reagent_dom.cljs","reagent/dom.cljs"], ["reagent_dom_server.cljs","reagent/dom/server.cljs"]]
deps: ['[reagent "0.6.0-alpha2" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server]]'
deps: ['[reagent "0.6.0-rc" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server]]'
'[re-frame "0.7.0"]'
'[prismatic/schema "1.0.4"]']
shims: ["cljsjs.react", "cljsjs.react.dom", "cljsjs.react.dom.server"]
@ -475,13 +476,14 @@ updateFigwheelUrls = (devEnvRoot, androidHost, iosHost) ->
mainIosDevPath = "#{devEnvRoot}/env/ios/main.cljs"
edit mainIosDevPath, [[figwheelUrlRx, "ws://#{iosHost}:"]]
# Current RN version (0.29.2) has no host in AppDelegate.m maybe docs are outdated?
updateIosAppDelegate = (projName, iosHost) ->
appDelegatePath = "ios/#{projName}/AppDelegate.m"
edit appDelegatePath, [[serverRx, "http://#{iosHost}"]]
edit appDelegatePath, [[appDelegateRx, "http://#{iosHost}"]]
updateIosRCTWebSocketExecutor = (iosHost) ->
RCTWebSocketExecutorPath = "node_modules/react-native/Libraries/WebSocket/RCTWebSocketExecutor.m"
edit RCTWebSocketExecutorPath, [[serverRx, "http://#{iosHost}"]]
edit RCTWebSocketExecutorPath, [[debugHostRx, "host = @\"#{iosHost}\";"]]
generateDevScripts = () ->
try
@ -508,9 +510,9 @@ generateDevScripts = () ->
fs.writeFileSync 'index.android.js', "#{moduleMap}require('figwheel-bridge').withModules(modules).start('#{projName}','android','#{androidDevHost}');"
log 'index.android.js was regenerated'
updateIosAppDelegate(projName, iosDevHost)
#updateIosAppDelegate(projName, iosDevHost)
updateIosRCTWebSocketExecutor(iosDevHost)
log "AppDelegate.m and RCTWebSocketExecutor.m were updated"
log "Host in RCTWebSocketExecutor.m was updated"
updateFigwheelUrls(devEnvRoot, androidDevHost, iosDevHost)
log 'Dev server host for iOS: ' + iosDevHost

View File

@ -3,8 +3,8 @@
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.170"]
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.8.51"]
$INTERFACE_DEPS$]
:plugins [[lein-cljsbuild "1.1.1"]
[lein-figwheel "0.5.0-6"]]