forked from ChurchApps/FreeShow
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakesnap
More file actions
executable file
·26 lines (23 loc) · 623 Bytes
/
makesnap
File metadata and controls
executable file
·26 lines (23 loc) · 623 Bytes
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
#!/bin/bash
set -e
version=$(grep "\"version\"" package.json | cut -d ":" -f 2 | cut -d "\"" -f 2)
sed -i "s/version:.*/version: ${version}/" config/building/snapcraft.yaml
if [ "$(uname -m)" = "aarch64" ]; then
npm run replace-electron
fi
npm install
npm run build
if [ "$(uname -m)" = "aarch64" ]; then
npm run pack:arm64
else
npm run pack
fi
chmod +x scripts/snap/*.sh
mkdir -p snap
mv scripts/snap/gui snap
mv config/building/snapcraft.yaml snap
if [ -e "dist/linux-arm64-unpacked" ]; then
mv dist/linux-arm64-unpacked dist/linux-unpacked
fi
cp scripts/snap/*.sh dist/linux-unpacked
snapcraft --verbose pack