Build & docker updates
Gitea token is no longer needed
This commit is contained in:
parent
6b780827a7
commit
01237ea78f
@ -1,3 +1,8 @@
|
||||
Dockerfile
|
||||
.git
|
||||
Makefile
|
||||
scripts
|
||||
**/*_test.go
|
||||
*.so
|
||||
**/*.so
|
||||
test
|
||||
build
|
11
Dockerfile
11
Dockerfile
@ -1,5 +1,6 @@
|
||||
# Using the same base golang image as plugeth
|
||||
FROM golang:1.20-alpine3.18 as builder
|
||||
# Using image with same alpine as plugeth,
|
||||
# but go 1.21 to evade https://github.com/Consensys/gnark-crypto/issues/468
|
||||
FROM golang:1.21-alpine3.18 as builder
|
||||
|
||||
RUN apk add --no-cache gcc musl-dev binutils-gold linux-headers git
|
||||
|
||||
@ -7,11 +8,9 @@ RUN apk add --no-cache gcc musl-dev binutils-gold linux-headers git
|
||||
ARG GIT_VDBTO_TOKEN
|
||||
|
||||
# Get and cache deps
|
||||
WORKDIR /plugeth-statediff/
|
||||
WORKDIR /plugeth-statediff
|
||||
COPY go.mod go.sum ./
|
||||
RUN if [ -n "$GIT_VDBTO_TOKEN" ]; then git config --global url."https://$GIT_VDBTO_TOKEN:@git.vdb.to/".insteadOf "https://git.vdb.to/"; fi && \
|
||||
go mod download && \
|
||||
rm -f ~/.gitconfig
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN go build --tags linkgeth --buildmode=plugin --trimpath -o statediff.so ./main
|
||||
|
5
Makefile
5
Makefile
@ -1,5 +1,6 @@
|
||||
MOCKGEN ?= mockgen
|
||||
MOCKS_DIR := $(CURDIR)/test_helpers/mocks
|
||||
BUILD_DIR ?= ./build
|
||||
|
||||
mocks: $(MOCKS_DIR)/gen_backend.go
|
||||
.PHONY: mocks
|
||||
@ -16,8 +17,8 @@ docker-image: mocks
|
||||
# Local build
|
||||
BUILD_FLAGS := --trimpath
|
||||
|
||||
plugin: build/statediff.so
|
||||
plugin: $(BUILD_DIR)/lib/statediff.so
|
||||
.PHONY: plugin
|
||||
|
||||
build/statediff.so: ./**/*.go
|
||||
$(BUILD_DIR)/lib/statediff.so: ./**/*.go
|
||||
go build --tags linkgeth --buildmode=plugin -o $@ $(BUILD_FLAGS) ./main
|
||||
|
Loading…
Reference in New Issue
Block a user