Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate installation of node and ZAP into a standalone part #21

Closed
MonicaisHer opened this issue Jun 30, 2023 · 0 comments · Fixed by #24
Closed

Separate installation of node and ZAP into a standalone part #21

MonicaisHer opened this issue Jun 30, 2023 · 0 comments · Fixed by #24

Comments

@MonicaisHer
Copy link
Contributor

The following script could be moved to a new part called nodjs-zap:

# Install NodeJS and ZAP tool for arm builds
if [[ $SNAP_ARCH == "arm64" ]]; then
set -x
mkdir node_js
cd node_js
wget https://nodejs.org/dist/v12.22.12/node-v12.22.12-linux-x64.tar.xz
tar xfvJ node-v12.22.12-linux-x64.tar.xz
cp -rn node-v12.22.12-linux-x64/. /opt/node-v12.22.12-linux-x64/
rm -r node-v12.22.12-linux-x64
rm -rf /opt/node
rm -rf /usr/bin/node
rm -rf /usr/bin/npm
rm -rf /usr/bin/npx
ln -s /opt/node-v12.22.12-linux-x64 /opt/node
ln -s /opt/node/bin/* /usr/bin
cd ..
rm -rf node_js
ZAP_VERSION=v2023.05.22-nightly
mkdir -p /opt/zap-${ZAP_VERSION}
git clone https://github.com/project-chip/zap.git /opt/zap-${ZAP_VERSION}
cd /opt/zap-${ZAP_VERSION}
git checkout -b ${ZAP_VERSION}
npm cache clean --force
npm install -g npm@latest
npm ci
export ZAP_DEVELOPMENT_PATH=/opt/zap-${ZAP_VERSION}
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants