1.添加build发布脚本

2.更新.gitgnore
3.更新readme.md
This commit is contained in:
linxiaozhi
2019-02-17 09:15:19 +08:00
parent e392e4c12e
commit 5254e85600
3 changed files with 38 additions and 4 deletions

7
.gitignore vendored
View File

@@ -1,6 +1,5 @@
PPGo_Job
.DS_Store
.idea
info.log
PPGo_Job*
info.log

View File

@@ -134,7 +134,9 @@ jobs/job.go:19:2: cannot find package "golang.org/x/crypto/ssh" in any of:
需要 git clone https://github.com/golang/crypto.git
并拷贝到 $GOPATH/src/golang.org/x/ 下就OK
git clone https://github.com/golang/crypto.git $GOPATH/src/golang.org/x/crypto
# Docker

33
build.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
# @Author: Bee
# @Date: 2019-02-17 08:38:58
# @Last Modified by: Bee
# @Last Modified time: 2019-02-17 08:38:58
version=$1
command -v tar >/dev/null 2>&1 || { echo >&2 "请检查tar是否已安装!"; exit 1; }
command -v go >/dev/null 2>&1 || { echo >&2 "请检查golang是否已安装或环境变量是否正确!"; exit 1; }
if [[ ! -n "$version" ]];then
echo "请执行如:"
echo "$0 1.0.0"
exit 1
fi
if [[ ! -d "build" ]];then
mkdir build
fi
go build -o PPGo_Job
cp -r -p PPGo_Job build/PPGo_Job
cp -r -p run.sh build/run.sh
cp -r -p conf build/conf
cp -r -p static build/static
cp -r -p views build/views
rm -rf build/static/imgs
cd build && tar zcvf ../PPGo_Job-$version.tar.gz .
rm -rf ../build