forked from junhaoliao/iCtrl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
macOS_build.sh
executable file
·47 lines (40 loc) · 1.53 KB
/
macOS_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
44
45
46
47
#!/bin/zsh
if [ "$(arch)" = "arm64" ]
then
cpu_arch="arm64"
else
cpu_arch="x64"
fi
echo ------------------------ Check Uncommitted Changes ------------------------
echo If you see any lines below, there are uncommitted changes:
git status -s
echo ------------------------ Confirm Desktop Client Info ------------------------
echo Have you updated the version info in desktop_client/package.json and made a
echo " commit? (y to proceed)"
read -r confirm
if [ "$confirm" != "y" ]
then
echo Please update the version info first
exit
fi
echo ------------------------ Build the Web Client ------------------------
cd client || exit
npm i --force
npm run build
cd ..
echo ------------------------ Compile the Python Backend ------------------------
source venv/bin/activate
pyinstaller --noconfirm --clean macOS_ictrl_be.spec
echo ----------------- Compile the Electron Frontend --------------------
cd desktop_client || exit
npm i
npm run make
cd ..
echo ----------------- Publish the Application --------------------
cd "./desktop_client/out/iCtrl Desktop-darwin-$cpu_arch" || exit
ditto -c -k --sequesterRsrc --keepParent --zlibCompressionLevel 9 "./iCtrl Desktop.app" "ictrl-desktop-darwin-$cpu_arch.zip"
cd ../../..
node publish/mac_publish.js junhaoliao iCtrl \
"./desktop_client/out/iCtrl Desktop-darwin-$cpu_arch/ictrl-desktop-darwin-$cpu_arch.zip" "ictrl-desktop-darwin-$cpu_arch.zip"
node publish/mac_publish.js junhaoliao iCtrl \
"./desktop_client/out/make/ictrl-desktop-setup.dmg" "ictrl-desktop-darwin-$cpu_arch.dmg"