Skip to content

Commit

Permalink
Change yarn version to deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
paularintaharri committed Apr 17, 2024
1 parent 41fdb78 commit d5bca13
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ selectNodeVersion
# 3. Install npm packages
if [ -e "$DEPLOYMENT_TARGET/package.json" ]; then
cd "$DEPLOYMENT_TARGET"
# Change yarn version
DESIRED_YARN_VERSION="1.22.22"
CURRENT_YARN_VERSION=$(yarn --version)
if [[ "$CURRENT_YARN_VERSION" != "$DESIRED_YARN_VERSION" ]]; then
echo "Vaihdetaan Yarn-versioon $DESIRED_YARN_VERSION"
npm install -g yarn@$DESIRED_YARN_VERSION
fi
echo "Running yarn install"
yarn install
exitWithMessageOnError "yarn failed"
Expand Down

0 comments on commit d5bca13

Please sign in to comment.