Update how to build

pull/1259/head
小白-白 2 years ago
parent 0e5683bc3b
commit 4d4a31c250

@ -40,7 +40,7 @@
* :cloud: 支持本机、从机、七牛、阿里云 OSS、腾讯云 COS、又拍云、OneDrive (包括世纪互联版) 作为存储端
* :outbox_tray: 上传/下载 支持客户端直传,支持下载限速
* 💾 可对接 Aria2 离线下载,可使用多个从机点分担下载任务
* 💾 可对接 Aria2 离线下载,可使用多个从机点分担下载任务
* 📚 在线 压缩/解压缩、多文件打包下载
* 💻 覆盖全部存储策略的 WebDAV 协议支持
* :zap: 拖拽上传、目录上传、流式上传处理
@ -71,7 +71,7 @@ chmod +x ./cloudreve
## :gear: 构建
自行构建前需要拥有 `Go >= 1.17`、`yarn`等必要依赖。
自行构建前需要拥有 `Go >= 1.17`、`node.js`、`yarn`、`zip` 等必要依赖。
#### 克隆代码
@ -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
```
#### 编译项目
@ -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]
@ -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: 许可证

@ -88,7 +88,7 @@ usage() {
exit 1
}
while getopts "bacr:d" o; do
while getopts "bacrd" o; do
case "${o}" in
b)
ASSETS="true"

Loading…
Cancel
Save