2019-04-11 03:38:43 +00:00
|
|
|
#!/bin/bash
|
2023-07-30 14:01:43 +00:00
|
|
|
ARCH=$(python -c "import platform; n = platform.architecture()[0]; print(n)")
|
2019-04-11 03:38:43 +00:00
|
|
|
|
2020-08-18 18:58:39 +00:00
|
|
|
set -e
|
2020-08-18 18:58:52 +00:00
|
|
|
set -x
|
2020-04-28 16:34:05 +00:00
|
|
|
|
2019-11-15 18:09:53 +00:00
|
|
|
if [ "$BUILD" = "windows" ]; then
|
2023-07-30 14:01:43 +00:00
|
|
|
if [ "$ARCH" = "32bit" ]; then
|
|
|
|
args="-w --ia32"
|
|
|
|
else
|
|
|
|
args="-w --x64"
|
|
|
|
fi
|
2019-11-15 18:09:53 +00:00
|
|
|
elif [ "$BUILD" = "linux" ]; then
|
2022-04-18 08:59:42 +00:00
|
|
|
args="-l"
|
2020-04-28 16:34:05 +00:00
|
|
|
elif [ "$BUILD" = "osx" ]; then
|
2021-12-08 21:18:41 +00:00
|
|
|
cp installer_scripts/electron-entitlements.plist electron/build/
|
2020-04-28 16:34:05 +00:00
|
|
|
args="-m"
|
2019-04-11 03:38:43 +00:00
|
|
|
fi
|
2020-04-28 16:34:05 +00:00
|
|
|
|
2022-02-28 15:30:40 +00:00
|
|
|
# electron version setting on release
|
|
|
|
if [[ "$VERSION" =~ ^v[0-9][.0-9]+$ ]]; then
|
|
|
|
sed -i'' -e 's/11.99.11/'"${VERSION#v}"'/' electron/package.json
|
|
|
|
fi
|
2020-04-28 16:34:05 +00:00
|
|
|
cd electron
|
2020-08-18 18:58:52 +00:00
|
|
|
which yarn > /dev/null 2>&1 || npm install -g yarn
|
2020-04-28 16:34:05 +00:00
|
|
|
yarn --link-duplicates --pure-lockfile
|
|
|
|
yarn run dist ${args}
|