Skip to content

Commit 8f28c56

Browse files
committed
Try to fix e2e
1 parent 2646409 commit 8f28c56

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

tasks/cra.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ root_path=$PWD
5858
# Do not overwrite any files in the current folder.
5959
clean_path=`mktemp -d 2>/dev/null || mktemp -d -t 'clean_path'`
6060

61-
# Copy some of the project files to the temporary folder.
61+
# Copy some of the react-scripts project files to the temporary folder.
6262
# Exclude folders that definitely won’t be part of the package from processing.
6363
# We will strip the dev-only code there, `npm pack`, and copy the package back.
64-
cd $root_path
64+
cd $root_path/packages/react-scripts
6565
rsync -av --exclude='.git' --exclude=$clean_path\
6666
--exclude='node_modules' --exclude='build'\
6767
'./' $clean_path >/dev/null
@@ -76,7 +76,7 @@ for file in $files; do
7676
done
7777

7878
# Finally, pack react-scripts
79-
cp -rf $root_path/node_modules $clean_path
79+
cp -rf $root_path/packages/react-scripts/node_modules $clean_path
8080
scripts_path=$clean_path/`npm pack`
8181

8282
# ******************************************************************************

tasks/e2e.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,18 @@ npm start -- --smoke-test
8585
# ******************************************************************************
8686

8787
# Pack CLI (it doesn't need cleaning)
88-
cd packages/create-react-app
88+
cd $root_path/packages/create-react-app
8989
cli_path=$PWD/`npm pack`
9090

9191
# Packing react-scripts takes more work because we want to clean it up first.
9292
# Create a temporary clean folder that contains production only code.
9393
# Do not overwrite any files in the current folder.
9494
clean_path=`mktemp -d 2>/dev/null || mktemp -d -t 'clean_path'`
9595

96-
# Copy some of the project files to the temporary folder.
96+
# Copy some of the react-scripts project files to the temporary folder.
9797
# Exclude folders that definitely won’t be part of the package from processing.
9898
# We will strip the dev-only code there, `npm pack`, and copy the package back.
99-
cd $root_path
99+
cd $root_path/packages/react-scripts
100100
rsync -av --exclude='.git' --exclude=$clean_path\
101101
--exclude='node_modules' --exclude='build'\
102102
'./' $clean_path >/dev/null
@@ -183,7 +183,7 @@ npm start -- --smoke-test
183183

184184

185185
# ******************************************************************************
186-
# Test --scripts-version is a version number
186+
# Test --scripts-version with a version number
187187
# ******************************************************************************
188188

189189
cd $temp_app_path
@@ -195,7 +195,7 @@ test -e node_modules/react-scripts
195195
grep '"version": "0.4.0"' node_modules/react-scripts/package.json
196196

197197
# ******************************************************************************
198-
# Test --scripts-version is a tarball url
198+
# Test --scripts-version with a tarball url
199199
# ******************************************************************************
200200

201201
cd $temp_app_path
@@ -207,7 +207,7 @@ test -e node_modules/react-scripts
207207
grep '"version": "0.4.0"' node_modules/react-scripts/package.json
208208

209209
# ******************************************************************************
210-
# Test --scripts-version is a custom fork of react-scripts
210+
# Test --scripts-version with a custom fork of react-scripts
211211
# ******************************************************************************
212212

213213
cd $temp_app_path

0 commit comments

Comments
 (0)