代码拉取完成,页面将自动刷新
同步操作将从 Juicedata/JuiceFS 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
export GO111MODULE=on
all: juicefs
REVISION := $(shell git rev-parse --short HEAD 2>/dev/null)
REVISIONDATE := $(shell git log -1 --pretty=format:'%ad' --date short 2>/dev/null)
VERSION := $(shell git describe --tags --match 'v*' 2>/dev/null | sed -e 's/^v//' -e 's/-g[0-9a-f]\{7,\}$$//')
PKG := github.com/juicedata/juicefs/pkg/version
LDFLAGS = -s -w
ifneq ($(strip $(VERSION)),)
LDFLAGS += -X $(PKG).revision=$(REVISION) \
-X $(PKG).revisionDate=$(REVISIONDATE) \
-X $(PKG).version=$(VERSION)
else ifneq ($(strip $(REVISION)),) # Use git clone with --depth or --no-tags
LDFLAGS += -X $(PKG).revision=$(REVISION) \
-X $(PKG).revisionDate=$(REVISIONDATE)
endif
SHELL = /bin/sh
ifdef STATIC
LDFLAGS += -linkmode external -extldflags '-static'
CC = /usr/bin/musl-gcc
export CC
endif
juicefs: Makefile cmd/*.go pkg/*/*.go
go build -ldflags="$(LDFLAGS)" -o juicefs ./cmd
juicefs.lite: Makefile cmd/*.go pkg/*/*.go
go build -tags nogateway,nocos,nobos,nohdfs,noibmcos,nobs,nooss,noqingstor,noscs,nosftp,noswift,noupyun,noazure,nogs \
-ldflags="$(LDFLAGS)" -o juicefs.lite ./cmd
juicefs.ceph: Makefile cmd/*.go pkg/*/*.go
go build -tags ceph -ldflags="$(LDFLAGS)" -o juicefs.ceph ./cmd
/usr/local/include/winfsp:
sudo mkdir -p /usr/local/include/winfsp
sudo cp hack/winfsp_headers/* /usr/local/include/winfsp
juicefs.exe: /usr/local/include/winfsp cmd/*.go pkg/*/*.go
GOOS=windows CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc \
go build -ldflags="$(LDFLAGS)" -buildmode exe -o juicefs.exe ./cmd
.PHONY: snapshot release test
snapshot:
docker run --rm --privileged \
-e PRIVATE_KEY=${PRIVATE_KEY} \
-v ~/go/pkg/mod:/go/pkg/mod \
-v `pwd`:/go/src/github.com/juicedata/juicefs \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/github.com/juicedata/juicefs \
juicedata/golang-cross:latest release --snapshot --rm-dist --skip-publish
release:
docker run --rm --privileged \
-e PRIVATE_KEY=${PRIVATE_KEY} \
--env-file .release-env \
-v ~/go/pkg/mod:/go/pkg/mod \
-v `pwd`:/go/src/github.com/juicedata/juicefs \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/github.com/juicedata/juicefs \
juicedata/golang-cross:latest release --rm-dist
test:
go test -cover ./pkg/... ./cmd/...
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。