build(snap): use nil package and try to setup node in override-build step

This commit is contained in:
fallenbagel
2023-11-07 05:17:39 +05:00
parent e8ee6f9e32
commit 9ac56a4057

View File

@@ -16,10 +16,12 @@ architectures:
parts:
jellyseerr:
plugin: npm
npm-node-version: '18.18.2'
plugin: nil
build-packages:
- git
- ca-certificates
- curl
- gnupg
- on arm64:
- build-essential
- automake
@@ -67,6 +69,20 @@ parts:
- CYPRESS_INSTALL_BINARY: '0'
override-build: |
set -e
# Install necessary packages
mkdir -p /etc/apt/keyrings
# Add Node.js repository key
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
# Set Node.js version
NODE_MAJOR=18
# Add Node.js repository to sources list
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
# Update package sources and install Node.js
apt-get update
apt-get install nodejs -y
# Install Yarn
npm install -g yarn
# Set COMMIT_TAG before the build begins