-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean packages from yarn cache in process_package_json step of yarn_i…
…nstall that have file:// URIs (#639) Also includes local development script updates
- Loading branch information
1 parent
6931c75
commit 4fc26bd
Showing
20 changed files
with
217 additions
and
57 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
"scripts": { | ||
"test": "bazel build :all" | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu -o pipefail | ||
# -e: exits if a command fails | ||
# -u: errors if an variable is referenced before being set | ||
# -o pipefail: causes a pipeline to produce a failure return code if any command errors | ||
|
||
readonly RULES_NODEJS_DIR=$(cd $(dirname "$0")/..; pwd) | ||
|
||
${RULES_NODEJS_DIR}/scripts/build_release.sh | ||
${RULES_NODEJS_DIR}/scripts/build_packages_all.sh |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu -o pipefail | ||
# -e: exits if a command fails | ||
# -u: errors if an variable is referenced before being set | ||
# -o pipefail: causes a pipeline to produce a failure return code if any command errors | ||
|
||
readonly YARN_CACHE_ROOT=$(dirname $(yarn cache dir)) | ||
readonly RULES_NODEJS_DIR=$(cd $(dirname "$0")/..; pwd) | ||
source "${RULES_NODEJS_DIR}/scripts/packages.sh" | ||
|
||
echo_and_run() { echo "+ $@" ; "$@" ; } | ||
|
||
echo "yarn cache root: ${YARN_CACHE_ROOT}" | ||
|
||
for package in ${PACKAGES[@]} ; do | ||
echo_and_run yarn cache clean @bazel/${package} | ||
done | ||
|
||
# Also clean cache for different versions of yarn since the locally installed | ||
# yarn may have a different cache version from yarn version used by Bazel | ||
for package in ${PACKAGES[@]} ; do | ||
echo_and_run rm -rf ${YARN_CACHE_ROOT}/*/npm-@bazel-${package}-* | ||
done |
Oops, something went wrong.