添加打包文件

This commit is contained in:
bjd 2020-12-28 17:13:47 +08:00
parent bdc8b30d32
commit 8372b9e58e
3 changed files with 27 additions and 19 deletions

View File

@ -28,28 +28,13 @@ AnyLink 服务端仅在CentOS7测试通过如需要安装在其他系统
> 升级 go version = 1.16 > 升级 go version = 1.16
```shell ```shell
rootPath=`pwd`
git clone https://github.com/bjdgyc/anylink.git git clone https://github.com/bjdgyc/anylink.git
git clone https://github.com/bjdgyc/anylink-web.git
cd $rootPath/anylink-web cd anylink
npm install sh deploy.sh
npm run build
cd $rootPath/anylink
cp -r $rootPath/anylink-web/ui .
go build -o anylink -ldflags "-X main.COMMIT_ID=`git rev-parse HEAD`"
#整理部署文件
mkdir $rootPath/anylink-deploy
cd $rootPath/anylink-deploy
cp -r $rootPath/anylink/anylink .
cp -r $rootPath/anylink/conf .
cp -r $rootPath/anylink/downfiles .
#注意使用root权限运行 #注意使用root权限运行
cd anylink-deploy
sudo ./anylink -conf="conf/server.toml" sudo ./anylink -conf="conf/server.toml"
``` ```

View File

@ -2,5 +2,5 @@ package base
const ( const (
APP_NAME = "AnyLink" APP_NAME = "AnyLink"
APP_VER = "0.0.5" APP_VER = "0.0.6"
) )

23
deploy.sh Normal file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
git clone https://github.com/bjdgyc/anylink-web.git
cd anylink-web
npm install
npm run build
cd ../
cp -r anylink-web/ui .
go build -o anylink -ldflags "-X main.COMMIT_ID=`git rev-parse HEAD`"
#整理部署文件
mkdir anylink-deploy
cd anylink-deploy
cp -r ../anylink .
cp -r ../conf .
cp -r ../down_files .
#注意使用root权限运行
#sudo ./anylink -conf="conf/server.toml"