-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
43 lines (30 loc) · 985 Bytes
/
build.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
#!/bin/bash
set -e
if [ "$VERSION" = "" ];
then
VERSION=2.0
fi
bash setversion.sh
rm -Rf build || true
mkdir -p deploy
mkdir -p build/AppDir
npm i
npm run build
wget https://nodejs.org/dist/v22.11.0/node-v22.11.0-linux-x64.tar.xz -O build/AppDir/node.tar.xz
tar -xf build/AppDir/node.tar.xz -C build/AppDir
rm build/AppDir/node.tar.xz
mv build/AppDir/node-*-linux-x64 build/AppDir/node
cp build/dist/*.js build/AppDir
cp *.json build/AppDir
cd build/AppDir
npm i --prefix=. --production
cd ..
wget https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage -O ./appimage-builder
chmod +x ./appimage-builder
./appimage-builder --appimage-extract
cp ../AppImageBuilder.yml .
sed -i "s/\$VERSION/$VERSION/g" AppImageBuilder.yml
squashfs-root/AppRun --recipe AppImageBuilder.yml
rm -Rf squashfs-root
cp -f *.AppImage ../deploy/hypergate
sha256sum ../deploy/hypergate | cut -d' ' -f1 > ../deploy/hypergate.sha256