Merge pull request #1959 from nspcc-dev/drop-vendoring
Drop vendoring, fix jsonpath lint
This commit is contained in:
commit
fcf29bc093
4 changed files with 11 additions and 21 deletions
13
Dockerfile
13
Dockerfile
|
@ -2,7 +2,7 @@
|
||||||
FROM golang:1-alpine as builder
|
FROM golang:1-alpine as builder
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& apk add --no-cache git \
|
&& apk add --no-cache git make \
|
||||||
&& mkdir -p /tmp
|
&& mkdir -p /tmp
|
||||||
|
|
||||||
COPY . /neo-go
|
COPY . /neo-go
|
||||||
|
@ -12,14 +12,7 @@ WORKDIR /neo-go
|
||||||
ARG REPO=repository
|
ARG REPO=repository
|
||||||
ARG VERSION=dev
|
ARG VERSION=dev
|
||||||
|
|
||||||
# https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away
|
RUN make build
|
||||||
# go build -mod=vendor
|
|
||||||
RUN set -x \
|
|
||||||
&& export GOGC=off \
|
|
||||||
&& export GO111MODULE=on \
|
|
||||||
&& export CGO_ENABLED=0 \
|
|
||||||
&& export LDFLAGS="-X ${REPO}/pkg/config.Version=${VERSION}" \
|
|
||||||
&& go build -trimpath -v -mod=vendor -ldflags "${LDFLAGS}" -o /go/bin/neo-go ./cli
|
|
||||||
|
|
||||||
# Executable image
|
# Executable image
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
@ -31,7 +24,7 @@ WORKDIR /
|
||||||
|
|
||||||
COPY --from=builder /neo-go/config /config
|
COPY --from=builder /neo-go/config /config
|
||||||
COPY --from=builder /neo-go/.docker/privnet-entrypoint.sh /usr/bin/privnet-entrypoint.sh
|
COPY --from=builder /neo-go/.docker/privnet-entrypoint.sh /usr/bin/privnet-entrypoint.sh
|
||||||
COPY --from=builder /go/bin/neo-go /usr/bin/neo-go
|
COPY --from=builder /neo-go/bin/neo-go /usr/bin/neo-go
|
||||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/privnet-entrypoint.sh"]
|
ENTRYPOINT ["/usr/bin/privnet-entrypoint.sh"]
|
||||||
|
|
16
Makefile
16
Makefile
|
@ -26,7 +26,7 @@ build: deps
|
||||||
@set -x \
|
@set -x \
|
||||||
&& export GOGC=off \
|
&& export GOGC=off \
|
||||||
&& export CGO_ENABLED=0 \
|
&& export CGO_ENABLED=0 \
|
||||||
&& go build -trimpath -v -mod=vendor -ldflags $(BUILD_FLAGS) -o ${BINARY} ./cli/main.go
|
&& go build -trimpath -v -ldflags $(BUILD_FLAGS) -o ${BINARY} ./cli/main.go
|
||||||
|
|
||||||
neo-go.service: neo-go.service.template
|
neo-go.service: neo-go.service.template
|
||||||
@sed -r -e 's_BINDIR_$(BINDIR)_' -e 's_UNITWORKDIR_$(UNITWORKDIR)_' -e 's_SYSCONFIGDIR_$(SYSCONFIGDIR)_' $< >$@
|
@sed -r -e 's_BINDIR_$(BINDIR)_' -e 's_UNITWORKDIR_$(UNITWORKDIR)_' -e 's_SYSCONFIGDIR_$(SYSCONFIGDIR)_' $< >$@
|
||||||
|
@ -68,8 +68,10 @@ check-version:
|
||||||
git fetch && (! git rev-list ${VERSION})
|
git fetch && (! git rev-list ${VERSION})
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
@go mod tidy -v
|
@CGO_ENABLED=0 \
|
||||||
@go mod vendor
|
go mod download
|
||||||
|
@CGO_ENABLED=0 \
|
||||||
|
go mod tidy -v
|
||||||
|
|
||||||
push-tag:
|
push-tag:
|
||||||
git checkout ${BRANCH}
|
git checkout ${BRANCH}
|
||||||
|
@ -94,13 +96,7 @@ cover:
|
||||||
@go tool cover -html=coverage.txt -o coverage.html
|
@go tool cover -html=coverage.txt -o coverage.html
|
||||||
|
|
||||||
# --- Environment ---
|
# --- Environment ---
|
||||||
env_vendor:
|
env_image:
|
||||||
@echo "=> Update vendor"
|
|
||||||
@go mod tidy
|
|
||||||
@go mod download
|
|
||||||
@go mod vendor
|
|
||||||
|
|
||||||
env_image: env_vendor
|
|
||||||
@echo "=> Building env image"
|
@echo "=> Building env image"
|
||||||
@docker build \
|
@docker build \
|
||||||
-t env_neo_go_image \
|
-t env_neo_go_image \
|
||||||
|
|
1
go.sum
1
go.sum
|
@ -269,6 +269,7 @@ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAG
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
|
|
@ -351,7 +351,7 @@ func (p *pathParser) processUnion(objs []interface{}, firstTyp pathTokenType, fi
|
||||||
}
|
}
|
||||||
|
|
||||||
items = append(items, val)
|
items = append(items, val)
|
||||||
typ, val = p.nextToken()
|
typ, _ = p.nextToken()
|
||||||
if typ == pathRightBracket {
|
if typ == pathRightBracket {
|
||||||
break
|
break
|
||||||
} else if typ != pathComma {
|
} else if typ != pathComma {
|
||||||
|
|
Loading…
Reference in a new issue