Skip to content

Commit

Permalink
Merge pull request cloudreve#1259 from xb2016/master
Browse files Browse the repository at this point in the history
Update how to build
  • Loading branch information
HFO4 authored May 5, 2022
2 parents a78407d + 4d4a31c commit eef6c40
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

* :cloud: 支持本机、从机、七牛、阿里云 OSS、腾讯云 COS、又拍云、OneDrive (包括世纪互联版) 作为存储端
* :outbox_tray: 上传/下载 支持客户端直传,支持下载限速
* 💾 可对接 Aria2 离线下载,可使用多个从机机点分担下载任务
* 💾 可对接 Aria2 离线下载,可使用多个从机节点分担下载任务
* 📚 在线 压缩/解压缩、多文件打包下载
* 💻 覆盖全部存储策略的 WebDAV 协议支持
* :zap: 拖拽上传、目录上传、流式上传处理
Expand Down Expand Up @@ -71,7 +71,7 @@ chmod +x ./cloudreve

## :gear: 构建

自行构建前需要拥有 `Go >= 1.17``yarn`等必要依赖。
自行构建前需要拥有 `Go >= 1.17``node.js``yarn``zip` 等必要依赖。

#### 克隆代码

Expand All @@ -88,7 +88,12 @@ cd assets
yarn install
# 开始构建
yarn run build

# 构建完成后删除映射文件
cd build
find . -name "*.map" -type f -delete
# 返回项目主目录打包静态资源
cd ../../
zip -r - assets/build >assets.zip
```

#### 编译项目
Expand All @@ -102,7 +107,7 @@ export VERSION=$(git describe --tags)
go build -a -o cloudreve -ldflags "-s -w -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.BackendVersion=$VERSION' -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.LastCommit=$COMMIT_SHA'"
```

你也可以使用项目根目录下的`build.sh`快速开始构建:
你也可以使用项目根目录下的 `build.sh` 快速开始构建:

```shell
./build.sh [-a] [-c] [-b] [-r]
Expand All @@ -114,7 +119,7 @@ go build -a -o cloudreve -ldflags "-s -w -X 'github.com/cloudreve/Cloudreve/v3/p

## :alembic: 技术栈

* [Go ](https://golang.org/) + [Gin](https://github.com/gin-gonic/gin)
* [Go](https://golang.org/) + [Gin](https://github.com/gin-gonic/gin)
* [React](https://github.com/facebook/react) + [Redux](https://github.com/reduxjs/redux) + [Material-UI](https://github.com/mui-org/material-ui)

## :scroll: 许可证
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ usage() {
exit 1
}

while getopts "bacr:d" o; do
while getopts "bacrd" o; do
case "${o}" in
b)
ASSETS="true"
Expand Down

0 comments on commit eef6c40

Please sign in to comment.