forked from cypress-io/github-action
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupdate-cypress-latest-pnpm.sh
executable file
·44 lines (39 loc) · 1.02 KB
/
update-cypress-latest-pnpm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
set -e # fail on error
#
# Examples using the pnpm package manager are
# updated to Cypress latest version
#
# npm must be installed before running this script.
./scripts/check-package-manager-npm.sh
# Make sure that pnpm is installed
if command -v corepack &> /dev/null
then
echo disabling Corepack for pnpm
corepack disable pnpm
else
echo Corepack is not needed and not installed
fi
echo install latest pnpm version
npm add pnpm@latest -g
echo pnpm version $(pnpm --version) is installed
echo
echo updating pnpm examples to Cypress latest version
cd examples
# examples/basic-pnpm (pnpm)
echo
echo updating examples/basic-pnpm to cypress@latest
cd basic-pnpm
pnpm add cypress@latest --save-dev --save-exact
pnpm ls cypress
cd ..
# examples/start-and-pnpm-workspaces
echo
echo updating pnpm workspaces example to Cypress latest version
echo
echo updating examples/start-and-pnpm-workspaces to cypress@latest
cd start-and-pnpm-workspaces
pnpm update cypress --latest --recursive
pnpm ls cypress --recursive
cd ..
cd ..