-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathbuild_MacOS.sh
More file actions
executable file
·33 lines (26 loc) · 952 Bytes
/
build_MacOS.sh
File metadata and controls
executable file
·33 lines (26 loc) · 952 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
27
28
29
30
31
32
33
#!/bin/bash
VERSION=$(git describe --tags --always | sed 's/\./_/g')
rm -rf dist
mkdir -p dist/x86_64
yarn
cd packages/devtools
rm -rf build
yarn build
rm -rf build/windows
cd ../..
rm -rf target/release
RUSTFLAGS="-l framework=WebKit" MACOSX_DEPLOYMENT_TARGET=11.0 cargo build --release --target=x86_64-apple-darwin
RUSTFLAGS="-l framework=WebKit" MACOSX_DEPLOYMENT_TARGET=11.0 cargo build --release --target=aarch64-apple-darwin
target/x86_64-apple-darwin/release/niva \
--debug-resource=packages/devtools/build \
--debug-config=packages/devtools/niva.json \
--project=packages/devtools \
--build=dist/x86_64/NivaDevtools.app
cp -r dist/x86_64 dist/aarch64
cp -f target/aarch64-apple-darwin/release/niva dist/aarch64/NivaDevtools.app/Contents/MacOS/NivaDevtools
cd dist/x86_64
zip -r ../NivaDevtools_"$VERSION"_MacOS_x86_64.zip NivaDevtools.app
cd -
cd dist/aarch64
zip -r ../NivaDevtools_"$VERSION"_MacOS_aarch64.zip NivaDevtools.app
cd -