Skip to content

Commit

Permalink
Update prepare-yarn-subprojects.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
dsame authored Jun 26, 2023
1 parent e48deb0 commit adde4c2
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions __tests__/prepare-yarn-subprojects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,20 @@ cat <<EOT >package.json
EOT
yarn set version 3.5.1
yarn install
if [ x$1 = 'xglobal' ];then
echo enableGlobalCache
echo 'enableGlobalCache: true' >> .yarnrc.yml
fi

cd ..
if [ x$1 != 'xkeepcache' -a x$2 != 'xkeepcache' ]; then
rm -rf sub2/.yarn/cache
rm -rf sub3/.yarn/cache
fi

if [ x$1 = 'xglobal' ];then
echo enableGlobalCache
echo 'enableGlobalCache: true' >> .yarnrc.yml
elif [ x$1 = 'xyarn1' ];then
echo "create yarn1 project in the root"
cat <<EOT >package.json
if [ x$1 = 'xyarn1' ];then
echo "create yarn1 project in the root"
cat <<EOT >package.json
{
"name": "subproject",
"dependencies": {
Expand All @@ -53,8 +54,6 @@ cat <<EOT >package.json
}
}
EOT
yarn set version 1.22.19
yarn install
yarn set version 1.22.19
yarn install
fi

if [ $x1 = 'n

0 comments on commit adde4c2

Please sign in to comment.