From 8f28c56e687fffc19404caa34539e7ab7dd2b23f Mon Sep 17 00:00:00 2001 From: Dan Abramov <dan.abramov@gmail.com> Date: Mon, 19 Sep 2016 13:30:04 +0300 Subject: [PATCH] Try to fix e2e --- tasks/cra.sh | 6 +++--- tasks/e2e.sh | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tasks/cra.sh b/tasks/cra.sh index 1fd60f6a2..8328e55f1 100755 --- a/tasks/cra.sh +++ b/tasks/cra.sh @@ -58,10 +58,10 @@ root_path=$PWD # Do not overwrite any files in the current folder. clean_path=`mktemp -d 2>/dev/null || mktemp -d -t 'clean_path'` -# Copy some of the project files to the temporary folder. +# Copy some of the react-scripts project files to the temporary folder. # Exclude folders that definitely won’t be part of the package from processing. # We will strip the dev-only code there, `npm pack`, and copy the package back. -cd $root_path +cd $root_path/packages/react-scripts rsync -av --exclude='.git' --exclude=$clean_path\ --exclude='node_modules' --exclude='build'\ './' $clean_path >/dev/null @@ -76,7 +76,7 @@ for file in $files; do done # Finally, pack react-scripts -cp -rf $root_path/node_modules $clean_path +cp -rf $root_path/packages/react-scripts/node_modules $clean_path scripts_path=$clean_path/`npm pack` # ****************************************************************************** diff --git a/tasks/e2e.sh b/tasks/e2e.sh index 399896cfe..a32b79228 100755 --- a/tasks/e2e.sh +++ b/tasks/e2e.sh @@ -85,7 +85,7 @@ npm start -- --smoke-test # ****************************************************************************** # Pack CLI (it doesn't need cleaning) -cd packages/create-react-app +cd $root_path/packages/create-react-app cli_path=$PWD/`npm pack` # Packing react-scripts takes more work because we want to clean it up first. @@ -93,10 +93,10 @@ cli_path=$PWD/`npm pack` # Do not overwrite any files in the current folder. clean_path=`mktemp -d 2>/dev/null || mktemp -d -t 'clean_path'` -# Copy some of the project files to the temporary folder. +# Copy some of the react-scripts project files to the temporary folder. # Exclude folders that definitely won’t be part of the package from processing. # We will strip the dev-only code there, `npm pack`, and copy the package back. -cd $root_path +cd $root_path/packages/react-scripts rsync -av --exclude='.git' --exclude=$clean_path\ --exclude='node_modules' --exclude='build'\ './' $clean_path >/dev/null @@ -183,7 +183,7 @@ npm start -- --smoke-test # ****************************************************************************** -# Test --scripts-version is a version number +# Test --scripts-version with a version number # ****************************************************************************** cd $temp_app_path @@ -195,7 +195,7 @@ test -e node_modules/react-scripts grep '"version": "0.4.0"' node_modules/react-scripts/package.json # ****************************************************************************** -# Test --scripts-version is a tarball url +# Test --scripts-version with a tarball url # ****************************************************************************** cd $temp_app_path @@ -207,7 +207,7 @@ test -e node_modules/react-scripts grep '"version": "0.4.0"' node_modules/react-scripts/package.json # ****************************************************************************** -# Test --scripts-version is a custom fork of react-scripts +# Test --scripts-version with a custom fork of react-scripts # ****************************************************************************** cd $temp_app_path -- GitLab