🔨 Update build scripts

This commit is contained in:
Liang Ding 2022-05-27 11:47:56 +08:00
parent 25034d5eb2
commit dc46b478bc
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
5 changed files with 13 additions and 12 deletions

28
scripts/linux-build.sh Normal file
View file

@ -0,0 +1,28 @@
#!/bin/bash
echo 'Building UI'
cd app
npm install && npm run build
cd ..
echo 'Cleaning Builds'
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
go build --tags fts5 -v -o "app/kernel-linux/SiYuan-Kernel" -ldflags "-s -w" .
cd ..
echo 'Building Electron'
cd app
npm run dist-linux
cd ..