-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild
executable file
·51 lines (37 loc) · 1.2 KB
/
build
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
48
49
#!/usr/bin/env sh
PLATFORM=$(uname -s)
ARCH=$(uname -m)
VERSION=0.1.6
export PATH=./node_modules/.bin:$PATH
echo "Building for $PLATFORM $ARCH"
# Rewrite $ARCH to match Electron's platform list
if [ "$ARCH" = "x86_64" ]; then
ARCH="x64"
fi
npm install
if [ "$PLATFORM" = "Darwin" ]; then
# Build the app
npm run make
# Create the DMG installer
electron-installer-dmg ./out/tea-package-builder-darwin-${ARCH}/tea-package-builder.app \
"TeaPackageBuilder" \
--out="./out/electron-installer-dmg/" \
--background="./images/installBackground658.png" \
--icon="./images/logo.icns" \
--title="Tea Package Builder" \
--overwrite \
--debug
# Clean up
rm -rf ./out/tea-package-builder-darwin-${ARCH} ./out/make
# Rename the DMG
mv ./out/electron-installer-dmg/TeaPackageBuilder.dmg ./out/electron-installer-dmg/TeaPackageBuilder-${PLATFORM}-${ARCH}.dmg
elif [ "$PLATFORM" = "Linux" ]; then
# Build the app
npm run make
if [ "$ARCH" = "x64" ]; then
# Rename the deb
mv ./out/make/deb/${ARCH}/tea-package-builder_${VERSION}_amd64.deb ./out/TeaPackageBuilder-${PLATFORM}-${ARCH}.deb
fi
# Clean up
rm -rf ./out/make ./out/tea-package-builder-linux-${ARCH}
fi