2022-05-26 15:18:53 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-05-27 11:47:56 +08:00
|
|
|
echo 'Building UI'
|
|
|
|
cd app
|
|
|
|
npm install && npm run build
|
|
|
|
cd ..
|
2022-05-26 15:18:53 +08:00
|
|
|
|
2022-05-27 11:47:56 +08:00
|
|
|
echo 'Cleaning Builds'
|
2022-05-26 15:18:53 +08:00
|
|
|
rm -rf app/build
|
|
|
|
rm -rf app/kernel-linux
|
|
|
|
|
|
|
|
echo 'Building Kernel'
|
|
|
|
|
|
|
|
cd kernel
|
|
|
|
go version
|
|
|
|
export GO111MODULE=on
|
|
|
|
export GOPROXY=https://goproxy.io
|
|
|
|
export CGO_ENABLED=1
|
|
|
|
|
|
|
|
export GOOS=linux
|
|
|
|
export GOARCH=amd64
|
2022-05-29 10:11:50 +08:00
|
|
|
go build --tags fts5 -v -o "../app/kernel-linux/SiYuan-Kernel" -ldflags "-s -w" .
|
2022-05-26 15:18:53 +08:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo 'Building Electron'
|
|
|
|
cd app
|
|
|
|
npm run dist-linux
|
|
|
|
cd ..
|