mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
Merge 8f19589ed7 into 479aa61f11
This commit is contained in:
commit
dccb13c6d3
3 changed files with 21 additions and 0 deletions
|
|
@ -3,6 +3,13 @@ FROM golang:1.9-alpine as builder
|
||||||
|
|
||||||
RUN apk add --no-cache make gcc musl-dev linux-headers
|
RUN apk add --no-cache make gcc musl-dev linux-headers
|
||||||
|
|
||||||
|
ARG GIT_COMMIT
|
||||||
|
ENV GIT_COMMIT ${GIT_COMMIT}
|
||||||
|
ARG GIT_BRANCH
|
||||||
|
ENV GIT_BRANCH ${GIT_BRANCH}
|
||||||
|
ARG GIT_TAG
|
||||||
|
ENV GIT_TAG ${GIT_TAG}
|
||||||
|
|
||||||
ADD . /go-ethereum
|
ADD . /go-ethereum
|
||||||
RUN cd /go-ethereum && make geth
|
RUN cd /go-ethereum && make geth
|
||||||
|
|
||||||
|
|
|
||||||
7
Makefile
7
Makefile
|
|
@ -34,6 +34,13 @@ ios:
|
||||||
@echo "Done building."
|
@echo "Done building."
|
||||||
@echo "Import \"$(GOBIN)/Geth.framework\" to use the library."
|
@echo "Import \"$(GOBIN)/Geth.framework\" to use the library."
|
||||||
|
|
||||||
|
docker:
|
||||||
|
docker build \
|
||||||
|
--build-arg GIT_COMMIT=$(shell git rev-parse HEAD) \
|
||||||
|
--build-arg GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) \
|
||||||
|
--build-arg GIT_TAG=$(shell git tag -l --points-at HEAD) \
|
||||||
|
-t ethereum:$(shell git rev-parse --short HEAD) .
|
||||||
|
|
||||||
test: all
|
test: all
|
||||||
build/env.sh go run build/ci.go test
|
build/env.sh go run build/ci.go test
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,13 @@ func Env() Environment {
|
||||||
IsPullRequest: os.Getenv("APPVEYOR_PULL_REQUEST_NUMBER") != "",
|
IsPullRequest: os.Getenv("APPVEYOR_PULL_REQUEST_NUMBER") != "",
|
||||||
IsCronJob: os.Getenv("APPVEYOR_SCHEDULED_BUILD") == "True",
|
IsCronJob: os.Getenv("APPVEYOR_SCHEDULED_BUILD") == "True",
|
||||||
}
|
}
|
||||||
|
case os.Getenv("GIT_COMMIT") != "":
|
||||||
|
return Environment{
|
||||||
|
Name: "docker",
|
||||||
|
Commit: os.Getenv("GIT_COMMIT"),
|
||||||
|
Branch: os.Getenv("GIT_BRANCH"),
|
||||||
|
Tag: os.Getenv("GIT_TAG"),
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return LocalEnv()
|
return LocalEnv()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue