Skip to content

Commit c43b249

Browse files
committed
Fix tasks
1 parent 841ae04 commit c43b249

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

tasks/clean_pack.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# We call this as part of the `release.sh` script.
1010
# On success, the only output to stdout is the package name.
1111

12-
# Start even if run from root directory
12+
# Start in /tasks even if run from root directory
1313
cd "$(dirname "$0")"
1414

1515
# Print error messages to stderr.
@@ -46,7 +46,7 @@ cd ..
4646

4747
# Create a temporary clean folder that contains production-only code.
4848
# Do not overwrite any files in the current folder.
49-
clean_path=`mktemp -d clean_XXXX`
49+
clean_path=`mktemp -d 2>/dev/null || mktemp -d -t 'clean_path'`
5050

5151
# Copy some of the project files to the temporary folder.
5252
# Exclude folders that definitely won’t be part of the package from processing.

tasks/e2e.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# LICENSE file in the root directory of this source tree. An additional grant
77
# of patent rights can be found in the PATENTS file in the same directory.
88

9-
# Start in tests/ even if run from root directory
9+
# Start in tasks/ even if run from root directory
1010
cd "$(dirname "$0")"
1111

1212
function cleanup {

tasks/release.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# LICENSE file in the root directory of this source tree. An additional grant
77
# of patent rights can be found in the PATENTS file in the same directory.
88

9-
# Start in tests/ even if run from root directory
9+
# Start in tasks/ even if run from root directory
1010
cd "$(dirname "$0")"
1111

1212
# Exit the script on any command with non 0 return code
@@ -19,6 +19,7 @@ set -x
1919

2020
# Go to root
2121
cd ..
22+
root_path=$PWD
2223

2324
# You can only release with npm >= 3
2425
if [ $(npm -v | head -c 1) -lt 3 ]; then
@@ -33,14 +34,14 @@ fi
3334

3435
# Create a temporary clean folder that contains production only code.
3536
# Do not overwrite any files in the current folder.
36-
clean_path=`mktemp -d clean_XXXX`
37+
clean_path=`mktemp -d 2>/dev/null || mktemp -d -t 'clean_path'`
3738

3839
# Copy some of the project files to the temporary folder.
3940
# Exclude folders that definitely won’t be part of the package from processing.
4041
# We will strip the dev-only code there, and then copy files back.
4142
rsync -av --exclude='.git' --exclude=$clean_path\
4243
--exclude='node_modules' --exclude='build'\
43-
'./' '$clean_path' >/dev/null
44+
'./' $clean_path >/dev/null
4445

4546
# Now remove all the code relevant to development of Create React App.
4647
cd $clean_path
@@ -64,7 +65,7 @@ npm dedupe
6465
rm -rf node_modules/fsevents
6566

6667
# This modifies $clean_path/package.json to copy all dependencies to bundledDependencies
67-
node ./node_modules/.bin/bundle-deps
68+
node $root_path/node_modules/.bin/bundle-deps
6869

6970
# Go!
7071
npm publish "$@"

0 commit comments

Comments
 (0)