Selaa lähdekoodia

bump to 0.7.0-dev.2

Ben Hsieh 8 vuotta sitten
vanhempi
commit
92a6043f71
3 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 1
    1
      src/package.json
  2. 3
    4
      src/scripts/prelink.js
  3. 3
    2
      test.sh

+ 1
- 1
src/package.json Näytä tiedosto

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "react-native-fetch-blob",
3
-  "version": "0.7.0-dev.1",
3
+  "version": "0.7.0-dev.2",
4 4
   "description": "A module provides upload, download, and files access API. Supports file stream read/write for process large files.",
5 5
   "main": "index.js",
6 6
   "scripts": {

+ 3
- 4
src/scripts/prelink.js Näytä tiedosto

@@ -13,15 +13,14 @@ var package = JSON.parse(fs.readFileSync(PACKAGE_JSON));
13 13
 var APP_NAME = package.name;
14 14
 var APPLICATION_MAIN = process.cwd() + '/android/app/src/main/java/com/' + APP_NAME.toLocaleLowerCase() + '/MainApplication.java';
15 15
 
16
-if(!fs.existsSync(APPLICATION_MAIN)) {
17
-  throw 'RNFetchBlob could not found link Android automatically, MainApplication.java not found in path : ' + APPLICATION_MAIN
18
-}
19
-
20 16
 var VERSION = checkVersion();
21 17
 console.log('RNFetchBlob detected app version .. ' + VERSION);
22 18
 
23 19
 if(VERSION >= 0.29) {
24 20
   console.log('RNFetchBlob patching MainApplication.java .. ');
21
+  if(!fs.existsSync(APPLICATION_MAIN)) {
22
+    throw 'RNFetchBlob could not link Android automatically, MainApplication.java not found in path : ' + APPLICATION_MAIN
23
+  }
25 24
   var main = fs.readFileSync(APPLICATION_MAIN);
26 25
   if(String(main).match('new RNFetchBlobPackage()') !== null) {
27 26
     console.log('skipped');

+ 3
- 2
test.sh Näytä tiedosto

@@ -37,11 +37,12 @@ node -e "var fs=require('fs'); var pkg = JSON.parse(fs.readFileSync('./RNFetchBl
37 37
 
38 38
 # install module
39 39
 cd "${TEST_APP_PATH}"
40
-npm install --save "${CWD}/src"
40
+# npm install --save "${CWD}/src"
41
+npm install --save react-native-fetch-blob@0.7.0-dev.1
41 42
 rnpm link
42 43
 
43 44
 # copy android assets
44
-cp -R ./test/assets/ ./RNFetchBlobTest/android/app/src/main/
45
+cp -R ./test/assets/ ./RNFetchBlobTest/android/app/src/main/assets/
45 46
 
46 47
 # start RN
47 48
 cd "${TEST_APP_PATH}"