diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2022-04-23 10:31:32 -0500 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2022-04-23 10:31:32 -0500 |
commit | d05cc15773758c8d77212c5da8f019cc567beb41 (patch) | |
tree | f7bbc3f10be9545f5033ba6fa8707a982c774138 /scripts | |
parent | Fix windows build script [skip ci] (diff) | |
download | ferdium-app-d05cc15773758c8d77212c5da8f019cc567beb41.tar.gz ferdium-app-d05cc15773758c8d77212c5da8f019cc567beb41.tar.zst ferdium-app-d05cc15773758c8d77212c5da8f019cc567beb41.zip |
Handle issue when 'CLEAN' is used and so 'pnpm' itself is not present
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build-unix.sh | 2 | ||||
-rw-r--r-- | scripts/build-windows.ps1 | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/build-unix.sh b/scripts/build-unix.sh index 07f9f2f81..4fbc78413 100755 --- a/scripts/build-unix.sh +++ b/scripts/build-unix.sh | |||
@@ -102,7 +102,7 @@ fi | |||
102 | 102 | ||
103 | # Check pnpm version | 103 | # Check pnpm version |
104 | EXPECTED_PNPM_VERSION=$(jq --raw-output .engines.pnpm ./recipes/package.json) | 104 | EXPECTED_PNPM_VERSION=$(jq --raw-output .engines.pnpm ./recipes/package.json) |
105 | ACTUAL_PNPM_VERSION=$(pnpm --version) | 105 | ACTUAL_PNPM_VERSION=$(pnpm --version || true) # in case the pnpm executable itself is not present |
106 | if [[ "$ACTUAL_PNPM_VERSION" != "$EXPECTED_PNPM_VERSION" ]]; then | 106 | if [[ "$ACTUAL_PNPM_VERSION" != "$EXPECTED_PNPM_VERSION" ]]; then |
107 | npm i -gf pnpm@$EXPECTED_PNPM_VERSION | 107 | npm i -gf pnpm@$EXPECTED_PNPM_VERSION |
108 | fi | 108 | fi |
diff --git a/scripts/build-windows.ps1 b/scripts/build-windows.ps1 index 99ea3d040..3c17d60ae 100644 --- a/scripts/build-windows.ps1 +++ b/scripts/build-windows.ps1 | |||
@@ -127,7 +127,7 @@ if ($EXPECTED_NPM_VERSION -ne $ACTUAL_NPM_VERSION) { | |||
127 | 127 | ||
128 | # Check pnpm version | 128 | # Check pnpm version |
129 | $EXPECTED_PNPM_VERSION = (Get-Content recipes\package.json | ConvertFrom-Json).engines.pnpm | 129 | $EXPECTED_PNPM_VERSION = (Get-Content recipes\package.json | ConvertFrom-Json).engines.pnpm |
130 | $ACTUAL_PNPM_VERSION = (pnpm --version) | 130 | $ACTUAL_PNPM_VERSION = (pnpm --version || true) # in case the pnpm executable itself is not present |
131 | if ($ACTUAL_PNPM_VERSION -ne $EXPECTED_PNPM_VERSION) { | 131 | if ($ACTUAL_PNPM_VERSION -ne $EXPECTED_PNPM_VERSION) { |
132 | npm i -gf pnpm@$EXPECTED_PNPM_VERSION | 132 | npm i -gf pnpm@$EXPECTED_PNPM_VERSION |
133 | } | 133 | } |