mirror of
https://gitee.com/sjqzhang/go-fastdfs.git
synced 2024-11-29 17:57:41 +08:00
fix big upload
This commit is contained in:
parent
b620ed0a20
commit
87b7cf0643
9
build.sh
9
build.sh
@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
BIN_VERSION="go-fastdfs:${1-$(git describe --tags `git rev-parse HEAD`)}"
|
||||
|
||||
if [[ ! -d src ]];then
|
||||
@ -15,6 +17,13 @@ mkdir -p src/github.com/sjqzhang/go-fastdfs
|
||||
cp -rf cmd doc server main.go src/github.com/sjqzhang/go-fastdfs
|
||||
|
||||
|
||||
GOPATH=`pwd` GOARCH=amd64 go test -v server/*.go
|
||||
|
||||
if [[ $? -ne 0 ]];then
|
||||
echo "test fail"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#for linux
|
||||
GOPATH=`pwd` GOOS=linux GOARCH=amd64 go build -o fileserver -ldflags "-w -s -X 'main.VERSION=$BIN_VERSION' -X 'main.BUILD_TIME=build_time:`date`' -X 'main.GO_VERSION=`go version`' -X 'main.GIT_VERSION=git_version:`git rev-parse HEAD`'" src/github.com/sjqzhang/go-fastdfs/main.go
|
||||
GOPATH=`pwd` GOOS=linux GOARCH=386 go build -o fileserver32 -ldflags "-w -s -X 'main.VERSION=$BIN_VERSION' -X 'main.BUILD_TIME=build_time:`date`' -X 'main.GO_VERSION=`go version`' -X 'main.GIT_VERSION=git_version:`git rev-parse HEAD`'" src/github.com/sjqzhang/go-fastdfs/main.go
|
||||
|
@ -272,12 +272,13 @@ func (c *Server) initComponent(isReload bool) {
|
||||
}
|
||||
}
|
||||
Config().Peers = peers
|
||||
if Config().EnablePprofDebug {
|
||||
mux = http.DefaultServeMux
|
||||
} else {
|
||||
mux = http.NewServeMux()
|
||||
}
|
||||
|
||||
if !isReload {
|
||||
if Config().EnablePprofDebug {
|
||||
mux = http.DefaultServeMux
|
||||
} else {
|
||||
mux = http.NewServeMux()
|
||||
}
|
||||
c.FormatStatInfo()
|
||||
if Config().EnableTus {
|
||||
c.initTus()
|
||||
|
Loading…
Reference in New Issue
Block a user