build(snap): changes node-js plugin to npm plugin for Core20

In an attempt to fix version compatibility of `GLIBC_2.28` base was upgraded from core18 to core20.
Node-js plugin was deprecated for core20 and instead npm plugin has to be used. As npm plugin cannot
specify the package manager to use, yarn is now installed globally during the override-build phase.
This commit is contained in:
fallenbagel
2023-11-07 04:58:28 +05:00
parent 40c739c5a4
commit 9348cdfd01

View File

@@ -16,10 +16,8 @@ architectures:
parts:
jellyseerr:
plugin: nodejs
nodejs-version: '18.18.2'
nodejs-package-manager: 'yarn'
nodejs-yarn-version: v1.22.19
plugin: npm
npm-node-version: '18.18.2'
build-packages:
- git
- on arm64:
@@ -69,6 +67,8 @@ parts:
- CYPRESS_INSTALL_BINARY: '0'
override-build: |
set -e
# Install Yarn
npm install -g yarn
# Set COMMIT_TAG before the build begins
export COMMIT_TAG=$(cat $SNAPCRAFT_PART_BUILD/commit.txt)
snapcraftctl build