From 2ac31da89e5c7b017198b704055427600975ae8e Mon Sep 17 00:00:00 2001 From: LazyDBA247-Anyvision Date: Tue, 15 Dec 2020 14:07:13 +0200 Subject: [PATCH] support build branches other than master --- docker/Dockerfile.go_build | 2 ++ docker/Dockerfile.go_build_large | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docker/Dockerfile.go_build b/docker/Dockerfile.go_build index 29b9a85d8..a5f8725e0 100644 --- a/docker/Dockerfile.go_build +++ b/docker/Dockerfile.go_build @@ -2,6 +2,8 @@ FROM frolvlad/alpine-glibc as builder RUN apk add git go g++ RUN mkdir -p /go/src/github.com/chrislusf/ RUN git clone https://github.com/chrislusf/seaweedfs /go/src/github.com/chrislusf/seaweedfs +ARG branch=${branch:-master} +RUN cd /go/src/github.com/chrislusf/seaweedfs && git checkout $ARG RUN cd /go/src/github.com/chrislusf/seaweedfs/weed \ && export LDFLAGS="-X github.com/chrislusf/seaweedfs/weed/util.COMMIT=$(git rev-parse --short HEAD)" \ && go install -ldflags "${LDFLAGS}" diff --git a/docker/Dockerfile.go_build_large b/docker/Dockerfile.go_build_large index fa22aeade..c3ea4e606 100644 --- a/docker/Dockerfile.go_build_large +++ b/docker/Dockerfile.go_build_large @@ -2,6 +2,8 @@ FROM frolvlad/alpine-glibc as builder RUN apk add git go g++ RUN mkdir -p /go/src/github.com/chrislusf/ RUN git clone https://github.com/chrislusf/seaweedfs /go/src/github.com/chrislusf/seaweedfs +ARG branch=${branch:-master} +RUN cd /go/src/github.com/chrislusf/seaweedfs && git checkout $ARG RUN cd /go/src/github.com/chrislusf/seaweedfs/weed \ && export LDFLAGS="-X github.com/chrislusf/seaweedfs/weed/util.COMMIT=$(git rev-parse --short HEAD)" \ && go install -tags 5BytesOffset -ldflags "${LDFLAGS}"