Skip to content

Commit

Permalink
Improve npm deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoNatan committed Nov 30, 2016
1 parent 994af2a commit 8a0d82b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 43 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,4 @@ buck-out/
\.buckd/
android/app/libs
android/keystores/debug.keystore
ios.tar
1 change: 1 addition & 0 deletions detox/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ios/EarlGrey/fishhook
ios/EarlGrey/Tests/UnitTests/ocmock
ios/EarlGrey/Tests/UnitTests/TestRig/Resources
ios/EarlGrey/Tests/FunctionalTests/TestRig/Resources
ios/

build/
DerivedData/
Expand Down
2 changes: 1 addition & 1 deletion detox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"author": "Tal Kol <[email protected]>",
"license": "MIT",
"scripts": {
"build": "BABEL_ENV=test babel src -d lib",
"build": "scripts/build.sh",
"test-install": "node scripts/test-install.js",
"test-clean": "node scripts/test-clean.js",
"test-update-js": "node scripts/test-update-js.js",
Expand Down
5 changes: 5 additions & 0 deletions detox/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

BABEL_ENV=test babel src -d lib
rm -f ios.tar
tar -cf ios.tar ios
2 changes: 2 additions & 0 deletions detox/scripts/clean-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ var shell = require('shelljs');
// it should be run with: `node ./node_modules/detox/scripts/clean-build.js`
// from the project root (where package.json is)

shell.exec('rm -f ios.tar');

shell.echo('\n#################################################################');
shell.echo('# deleting node_modules/detox/ios/EarlGrey/OCHamcrest.framework');
shell.rm('-rf', './node_modules/detox/ios/EarlGrey/OCHamcrest.framework');
Expand Down
4 changes: 0 additions & 4 deletions detox/scripts/fixup-softlinks.sh

This file was deleted.

12 changes: 5 additions & 7 deletions detox/scripts/postinstall.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
#!/bin/bash

printf "\n#################################################################"
echo "# fixing SocketRocket soft links"
printf "\n#################################################################\n"

scripts/fixup-softlinks.sh
if [ $? != 0 ]; then
echo "error: could not fix SocketRocket soft links."
exit 1
if [ -f ios.tar ]; then
tar -xf ios.tar
rm -f ios.tar
fi

brew list fbsimctl &> /dev/null
if [ $? != 0 ]; then
printf "\n#################################################################"
printf "\n#################################################################\n"
brew help &> /dev/null
if [ $? != 0 ]; then
echo "error: could not fix SocketRocket soft links."
Expand Down
31 changes: 0 additions & 31 deletions detox/scripts/postinstall__shelljs.js

This file was deleted.

0 comments on commit 8a0d82b

Please sign in to comment.