Skip to content

Commit

Permalink
Merge pull request #3 from bfahrenfort/main
Browse files Browse the repository at this point in the history
Add Linux build functionality
  • Loading branch information
xudaolong authored May 6, 2023
2 parents 51f685d + efd0c4a commit 1a9fdb7
Show file tree
Hide file tree
Showing 3 changed files with 1,604 additions and 1,537 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ npm-debug.log.*
*.css.d.ts
*.sass.d.ts
*.scss.d.ts

# Build
bin/
release/
20 changes: 19 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,22 @@ w-build:
# 移动二进制文件到 release/app/bin 目录下, 如果目录不存在则创建
cd memos && mv memos ../release/app/bin/memos.exe
# 清空 git submodule memos 目录改动
cd memos && git clean -f -d
cd memos && git clean -f -d

core-build:
# 打包 memos/web 为静态文件
cd memos/web && yarn build
# 文件打包到 memos/server/static 目录下
cp -r memos/web/dist memos/server
# 打包 memos/server 为二进制文件
cd memos && go build -o memos ./main.go
# 移动二进制文件到 release/app/bin 目录下, 如果目录不存在则创建
mkdir -p release/app/bin/ # make directory
cd memos && mv memos ../release/app/bin/ # move into directory, don't become directory
# 清空 git submodule memos 目录改动
cd memos && git clean -f -d

l-build: | setup core-build
yarn run electron-builder --linux AppImage
mkdir -p bin && mv release/build/*.AppImage bin/

Loading

0 comments on commit 1a9fdb7

Please sign in to comment.