mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
swarm: use external build arg
This commit is contained in:
parent
62a8dd1653
commit
d82d485e75
1 changed files with 7 additions and 4 deletions
|
|
@ -1,13 +1,16 @@
|
||||||
FROM golang:1.11-alpine as builder
|
FROM golang:1.11-alpine as builder
|
||||||
|
|
||||||
|
ARG VERSION
|
||||||
|
|
||||||
RUN apk add --update git gcc g++ linux-headers
|
RUN apk add --update git gcc g++ linux-headers
|
||||||
RUN mkdir -p $GOPATH/src/github.com/ethereum && \
|
RUN mkdir -p $GOPATH/src/github.com/ethereum && \
|
||||||
cd $GOPATH/src/github.com/ethereum && \
|
cd $GOPATH/src/github.com/ethereum && \
|
||||||
git clone --depth 1 https://github.com/ethersphere/go-ethereum && \
|
git clone https://github.com/ethersphere/go-ethereum && \
|
||||||
cd $GOPATH/src/github.com/ethereum/go-ethereum && \
|
cd $GOPATH/src/github.com/ethereum/go-ethereum && \
|
||||||
VERSION=$(git rev-parse --short HEAD) go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/swarm && \
|
git checkout ${VERSION} && \
|
||||||
VERSION=$(git rev-parse --short HEAD) go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/swarm/swarm-smoke && \
|
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/swarm && \
|
||||||
VERSION=$(git rev-parse --short HEAD) go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/geth && \
|
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/swarm/swarm-smoke && \
|
||||||
|
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/geth && \
|
||||||
cp $GOPATH/bin/swarm /swarm && cp $GOPATH/bin/geth /geth && cp $GOPATH/bin/swarm-smoke /swarm-smoke
|
cp $GOPATH/bin/swarm /swarm && cp $GOPATH/bin/geth /geth && cp $GOPATH/bin/swarm-smoke /swarm-smoke
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue