Skip to content

Commit

Permalink
Add option to cache bust node_modules (#3603)
Browse files Browse the repository at this point in the history
Co-authored-by: sliptype <sliptype@gmail.com>
  • Loading branch information
dylanjeffers and sliptype authored Jun 15, 2023
1 parent 9b165c4 commit f4d28e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ commands:
type: string
steps:
- run:
name: Combine package-lock.json files to single file
command: ls -d -- packages/*/*-lock.json | awk -F packages '{printf "\"packages%s\" ", $2}' | xargs cat > << parameters.filename >>
name: Combine package-lock.json files to single file and also adds a random value at the end to cache bust if needed
command: |
ls -d -- packages/*/*-lock.json | awk -F packages '{printf "\"packages%s\" ", $2}' | xargs cat > << parameters.filename >>
echo cache-bust-v1 >> <<parameters.filename >>
create_concatenated_patch_file:
description: "Concatenate all patch-files recognized by lerna.js into single file. File is used as checksum source for part of caching key."
parameters:
Expand Down
6 changes: 4 additions & 2 deletions .circleci/src/commands/@commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ create_concatenated_package_lock:
type: string
steps:
- run:
name: Combine package-lock.json files to single file
command: ls -d -- packages/*/*-lock.json | awk -F packages '{printf "\"packages%s\" ", $2}' | xargs cat > << parameters.filename >>
name: Combine package-lock.json files to single file and also adds a random value at the end to cache bust if needed
command: |
ls -d -- packages/*/*-lock.json | awk -F packages '{printf "\"packages%s\" ", $2}' | xargs cat > << parameters.filename >>
echo cache-bust-v1 >> <<parameters.filename >>
create_concatenated_patch_file:
description: "Concatenate all patch-files recognized by lerna.js into single file. File is used as checksum source for part of caching key."
Expand Down

0 comments on commit f4d28e0

Please sign in to comment.