Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
c43b2492
Commit
c43b2492
authored
8 years ago
by
Dan Abramov
Browse files
Options
Download
Email Patches
Plain Diff
Fix tasks
parent
841ae047
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tasks/clean_pack.sh
+2
-2
tasks/clean_pack.sh
tasks/e2e.sh
+1
-1
tasks/e2e.sh
tasks/release.sh
+5
-4
tasks/release.sh
with
8 additions
and
7 deletions
+8
-7
tasks/clean_pack.sh
+
2
-
2
View file @
c43b2492
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
# We call this as part of the `release.sh` script.
# We call this as part of the `release.sh` script.
# On success, the only output to stdout is the package name.
# On success, the only output to stdout is the package name.
# Start even if run from root directory
# Start
in /tasks
even if run from root directory
cd
"
$(
dirname
"
$0
"
)
"
cd
"
$(
dirname
"
$0
"
)
"
# Print error messages to stderr.
# Print error messages to stderr.
...
@@ -46,7 +46,7 @@ cd ..
...
@@ -46,7 +46,7 @@ cd ..
# Create a temporary clean folder that contains production-only code.
# Create a temporary clean folder that contains production-only code.
# Do not overwrite any files in the current folder.
# Do not overwrite any files in the current folder.
clean_path
=
`
mktemp
-d
clean_
XXXX
`
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 project files to the temporary folder.
# Exclude folders that definitely won’t be part of the package from processing.
# Exclude folders that definitely won’t be part of the package from processing.
...
...
This diff is collapsed.
Click to expand it.
tasks/e2e.sh
+
1
-
1
View file @
c43b2492
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# LICENSE file in the root directory of this source tree. An additional grant
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
# of patent rights can be found in the PATENTS file in the same directory.
# Start in t
est
s/ even if run from root directory
# Start in t
ask
s/ even if run from root directory
cd
"
$(
dirname
"
$0
"
)
"
cd
"
$(
dirname
"
$0
"
)
"
function
cleanup
{
function
cleanup
{
...
...
This diff is collapsed.
Click to expand it.
tasks/release.sh
+
5
-
4
View file @
c43b2492
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# LICENSE file in the root directory of this source tree. An additional grant
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
# of patent rights can be found in the PATENTS file in the same directory.
# Start in t
est
s/ even if run from root directory
# Start in t
ask
s/ even if run from root directory
cd
"
$(
dirname
"
$0
"
)
"
cd
"
$(
dirname
"
$0
"
)
"
# Exit the script on any command with non 0 return code
# Exit the script on any command with non 0 return code
...
@@ -19,6 +19,7 @@ set -x
...
@@ -19,6 +19,7 @@ set -x
# Go to root
# Go to root
cd
..
cd
..
root_path
=
$PWD
# You can only release with npm >= 3
# You can only release with npm >= 3
if
[
$(
npm
-v
|
head
-c
1
)
-lt
3
]
;
then
if
[
$(
npm
-v
|
head
-c
1
)
-lt
3
]
;
then
...
@@ -33,14 +34,14 @@ fi
...
@@ -33,14 +34,14 @@ fi
# Create a temporary clean folder that contains production only code.
# Create a temporary clean folder that contains production only code.
# Do not overwrite any files in the current folder.
# Do not overwrite any files in the current folder.
clean_path
=
`
mktemp
-d
clean_
XXXX
`
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 project files to the temporary folder.
# Exclude folders that definitely won’t be part of the package from processing.
# Exclude folders that definitely won’t be part of the package from processing.
# We will strip the dev-only code there, and then copy files back.
# We will strip the dev-only code there, and then copy files back.
rsync
-av
--exclude
=
'.git'
--exclude
=
$clean_path
\
rsync
-av
--exclude
=
'.git'
--exclude
=
$clean_path
\
--exclude
=
'node_modules'
--exclude
=
'build'
\
--exclude
=
'node_modules'
--exclude
=
'build'
\
'./'
'
$clean_path
'
>
/dev/null
'./'
$clean_path
>
/dev/null
# Now remove all the code relevant to development of Create React App.
# Now remove all the code relevant to development of Create React App.
cd
$clean_path
cd
$clean_path
...
@@ -64,7 +65,7 @@ npm dedupe
...
@@ -64,7 +65,7 @@ npm dedupe
rm
-rf
node_modules/fsevents
rm
-rf
node_modules/fsevents
# This modifies $clean_path/package.json to copy all dependencies to bundledDependencies
# This modifies $clean_path/package.json to copy all dependencies to bundledDependencies
node
.
/node_modules/.bin/bundle-deps
node
$root_path
/node_modules/.bin/bundle-deps
# Go!
# Go!
npm publish
"
$@
"
npm publish
"
$@
"
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment