Skip to content

Commit cec0489

Browse files
committed
Pack files into tarball with random name
This is the only way to prevent Yarn from caching the contents. Yarn cache clean doesn't even eliminate the cache. Possibly a bug with Yarn?
1 parent 733d3af commit cec0489

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

demo/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# testing
99
/coverage
10-
package.tgz
10+
package-*.tgz
1111

1212
# production
1313
/build

demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"scripts": {
2121
"start": "react-scripts start",
2222
"build": "react-scripts build",
23-
"pretest": "yarn remove react-accessible-dropdown-menu-hook && yarn --cwd ../ pack --filename package.tgz && yarn add file:./package.tgz",
23+
"pretest": "RANDOM_STRING=$(LC_ALL=C tr -dc 'A-Za-z0-9' </dev/urandom | head -c 32 ; echo) && yarn remove react-accessible-dropdown-menu-hook && yarn --cwd ../ pack --filename package-$RANDOM_STRING.tgz && yarn add file:./package-$RANDOM_STRING.tgz && rm package-$RANDOM_STRING.tgz",
2424
"test": "react-scripts test",
2525
"posttest": "yarn remove react-accessible-dropdown-menu-hook && yarn add link:../",
2626
"lint": "eslint --ext .ts,.js,.tsx . && prettier --check '**/*.{ts,js,tsx,css,html,json}'",

0 commit comments

Comments
 (0)