Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
URenko committed Oct 13, 2024
1 parent c3e43ff commit d0fb458
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
11 changes: 4 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,16 @@ BuildDev() {
curl -L -o "${i}.tgz" "${url}"
sudo tar xf "${i}.tgz" --strip-components 1 -C /usr/local
done
OS_ARCHES=(linux-musl-amd64 linux-musl-arm64)
CGO_ARGS=(x86_64-linux-musl-gcc aarch64-linux-musl-gcc)
OS_ARCHES=(linux-amd64)
for i in "${!OS_ARCHES[@]}"; do
os_arch=${OS_ARCHES[$i]}
cgo_cc=${CGO_ARGS[$i]}
echo building for ${os_arch}
export GOOS=${os_arch%%-*}
export GOARCH=${os_arch##*-}
export CC=${cgo_cc}
export GOAMD64=v3
export CGO_ENABLED=1
go build -o ./dist/$appName-$os_arch -ldflags="$muslflags" -tags=jsoniter .
go build -o ./dist/$appName-$os_arch -ldflags="$ldflags" -tags=jsoniter .
done
xgo -targets=windows/amd64,darwin/amd64,darwin/arm64 -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
xgo -targets=windows/amd64 -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
mv alist-* dist
cd dist
cp ./alist-windows-amd64.exe ./alist-windows-amd64-upx.exe
Expand Down
1 change: 1 addition & 0 deletions drivers/terabox/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ func (d *Terabox) Put(ctx context.Context, dstDir model.Obj, stream model.FileSt
}
res, err = d.post_form("/api/create", params, data, nil)
log.Debugln(string(res))
time.Sleep(time.Duration(len(precreateResp.BlockList)/16+5) * time.Second)
return err
}

Expand Down
4 changes: 0 additions & 4 deletions server/webdav/webdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
status, err = h.handleUnlock(brw, r)
case "PROPFIND":
status, err = h.handlePropfind(brw, r)
// if there is a error for PROPFIND, we should be as an empty folder to the client
if err != nil {
status = http.StatusNotFound
}
case "PROPPATCH":
status, err = h.handleProppatch(brw, r)
}
Expand Down

0 comments on commit d0fb458

Please sign in to comment.