diff options
| author | chrislu <chris.lu@gmail.com> | 2025-11-27 23:13:51 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-11-27 23:13:51 -0800 |
| commit | 626954b76c33b5d3f62a84a44537324d569fa9dd (patch) | |
| tree | ef7c80a67574a93ac1170890f0a0dd24cacaf49f /docker/Dockerfile.go_build | |
| parent | 755b1b55ff59c84813c6ea553ce18bb8dee43b86 (diff) | |
| download | seaweedfs-4.01.tar.xz seaweedfs-4.01.zip | |
unified builds4.01
Diffstat (limited to 'docker/Dockerfile.go_build')
| -rw-r--r-- | docker/Dockerfile.go_build | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/docker/Dockerfile.go_build b/docker/Dockerfile.go_build index 47b0a28b3..2d9fe99ce 100644 --- a/docker/Dockerfile.go_build +++ b/docker/Dockerfile.go_build @@ -1,10 +1,17 @@ FROM golang:1.24-alpine as builder RUN apk add git g++ fuse RUN mkdir -p /go/src/github.com/seaweedfs/ -RUN git clone https://github.com/seaweedfs/seaweedfs /go/src/github.com/seaweedfs/seaweedfs ARG BRANCH=${BRANCH:-master} +# Clone with full history and all tags to ensure all commits are available +RUN git clone --no-single-branch --tags https://github.com/seaweedfs/seaweedfs /go/src/github.com/seaweedfs/seaweedfs ARG TAGS -RUN cd /go/src/github.com/seaweedfs/seaweedfs && (git checkout $BRANCH || (git fetch --unshallow && git checkout $BRANCH)) +RUN cd /go/src/github.com/seaweedfs/seaweedfs && \ + (git checkout $BRANCH || \ + (echo "Checkout failed, fetching all history..." && \ + git fetch --all --tags --prune && \ + git checkout $BRANCH) || \ + (echo "ERROR: Branch/commit $BRANCH not found in repository" && \ + echo "Available branches:" && git branch -a && exit 1)) RUN cd /go/src/github.com/seaweedfs/seaweedfs/weed \ && export LDFLAGS="-X github.com/seaweedfs/seaweedfs/weed/util/version.COMMIT=$(git rev-parse --short HEAD)" \ && CGO_ENABLED=0 go install -tags "$TAGS" -ldflags "-extldflags -static ${LDFLAGS}" |
