-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Use same config for branch deploys as for deploy previews (#1893)
* fix: Use same config for branch deploys as for deploy previews * chore: remove unnecessary duplicate build-deploy-preview.sh file * fix: Attempt to workaround Netlify cache issues for Lerna repos * chore: Remove useless debug file * fix: try to make Gatsby less slow
- Loading branch information
Showing
8 changed files
with
72 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
NODE_MODULES_CACHE="./node_modules" | ||
LERNA_CACHE="$NODE_MODULES_CACHE/lerna-cache" | ||
|
||
echo "Running netlify-lerna-cache.sh" | ||
mkdir -p "$NODE_MODULES_CACHE/lerna-cache" | ||
|
||
cache_deps() { | ||
PACKAGES=$(ls -1 $1) | ||
|
||
for PKG in $PACKAGES | ||
do | ||
PKG_NODE_MODULES="$1/$PKG/node_modules" | ||
if [ -d $PKG_NODE_MODULES ]; | ||
then | ||
mv $PKG_NODE_MODULES $LERNA_CACHE/$PKG | ||
echo "Cached node modules for $PKG" | ||
else | ||
echo "Unable to cache node modules for $PKG" | ||
fi | ||
done | ||
} | ||
|
||
cache_deps platform | ||
cache_deps extensions | ||
cache_deps modes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
NODE_MODULES_CACHE="./node_modules" | ||
LERNA_CACHE="$NODE_MODULES_CACHE/lerna-cache" | ||
|
||
echo "Running netlify-lerna-restore.sh" | ||
mkdir -p "$NODE_MODULES_CACHE/lerna-cache" | ||
echo "$NODE_MODULES_CACHE/lerna-cache/*" | ||
|
||
restore_deps() { | ||
PACKAGES=$(ls -1 $1) | ||
|
||
for PKG in $PACKAGES | ||
do | ||
PKG_CACHE="$LERNA_CACHE/$PKG" | ||
if [ -d $PKG_CACHE ]; | ||
then | ||
mv $PKG_CACHE $1/$PKG/node_modules | ||
echo "Restored node modules for $PKG" | ||
else | ||
echo "Unable to restore cache for $PKG" | ||
fi | ||
done | ||
} | ||
|
||
restore_deps platform | ||
restore_deps extensions | ||
restore_deps modes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters