Browse Source

bump to 0.7.0-dev.2

Ben Hsieh 8 years ago
parent
commit
92a6043f71
3 changed files with 7 additions and 7 deletions
  1. 1
    1
      src/package.json
  2. 3
    4
      src/scripts/prelink.js
  3. 3
    2
      test.sh

+ 1
- 1
src/package.json View File

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

+ 3
- 4
src/scripts/prelink.js View File

13
 var APP_NAME = package.name;
13
 var APP_NAME = package.name;
14
 var APPLICATION_MAIN = process.cwd() + '/android/app/src/main/java/com/' + APP_NAME.toLocaleLowerCase() + '/MainApplication.java';
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
 var VERSION = checkVersion();
16
 var VERSION = checkVersion();
21
 console.log('RNFetchBlob detected app version .. ' + VERSION);
17
 console.log('RNFetchBlob detected app version .. ' + VERSION);
22
 
18
 
23
 if(VERSION >= 0.29) {
19
 if(VERSION >= 0.29) {
24
   console.log('RNFetchBlob patching MainApplication.java .. ');
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
   var main = fs.readFileSync(APPLICATION_MAIN);
24
   var main = fs.readFileSync(APPLICATION_MAIN);
26
   if(String(main).match('new RNFetchBlobPackage()') !== null) {
25
   if(String(main).match('new RNFetchBlobPackage()') !== null) {
27
     console.log('skipped');
26
     console.log('skipped');

+ 3
- 2
test.sh View File

37
 
37
 
38
 # install module
38
 # install module
39
 cd "${TEST_APP_PATH}"
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
 rnpm link
42
 rnpm link
42
 
43
 
43
 # copy android assets
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
 # start RN
47
 # start RN
47
 cd "${TEST_APP_PATH}"
48
 cd "${TEST_APP_PATH}"