diff --git a/.gitignore b/.gitignore index 394355c..84950cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .release-env +CHANGELOG.md +.cache virtual-vxlan.exe virtual-vxlan dist diff --git a/Dockerfile b/Dockerfile index c0aee19..e51addc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,8 @@ FROM ghcr.io/gythialy/golang-cross:$GO_BUILDER_VERSION RUN apt-get update; \ apt-get --no-install-recommends -y -q install protobuf-compiler; \ + export GOPATH=/go-docker; \ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest; \ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest -ENV PATH="/root/go/bin:$PATH" +ENV PATH="/go-docker/bin:$PATH" diff --git a/Makefile b/Makefile index 8878a25..03756d4 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,8 @@ build-docker-image: .PHONY: deps deps: - go get -u github.com/golangci/golangci-lint/cmd/golangci-lint - go get -u github.com/git-chglog/git-chglog/cmd/git-chglog - go get -u golang.org/x/tools/cmd/goimports + go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest + go install golang.org/x/tools/cmd/goimports@latest go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest @@ -37,32 +36,36 @@ generate: clean: rm -rf virtual-vxlan* dist CHANGELOG.md -.PHONY: changelog -changelog: - git-chglog $(VERSION) > CHANGELOG.md - .PHONY: snapshot snapshot: + mkdir -p .cache/go docker run \ --rm --privileged \ + --user 1000:1000 \ -v /var/run/docker.sock:/var/run/docker.sock \ -v $(CURDIR):/go/src/$(PACKAGE_NAME) \ -v $(CURDIR)/sysroot:/sysroot \ + -v $(CURDIR)/.cache:/.cache \ + -v $(CURDIR)/.cache/go:/go \ -w /go/src/$(PACKAGE_NAME) \ goreleaser-cross:latest \ --clean --skip=publish --snapshot --verbose .PHONY: release -release: changelog +release: + mkdir -p .cache/go docker run \ --rm --privileged \ + --user 1000:1000 \ --env-file .release-env \ -v /var/run/docker.sock:/var/run/docker.sock \ -v $(CURDIR):/go/src/$(PACKAGE_NAME) \ -v $(CURDIR)/sysroot:/sysroot \ + -v $(CURDIR)/.cache:/.cache \ + -v $(CURDIR)/.cache/go:/go \ -w /go/src/$(PACKAGE_NAME) \ goreleaser-cross:latest \ - --clean --release-notes=CHANGELOG.md + --clean --skip=validate .PHONY: lint lint: diff --git a/vxlan/vxlan.pb.go b/vxlan/vxlan.pb.go index d1f32df..0417846 100644 --- a/vxlan/vxlan.pb.go +++ b/vxlan/vxlan.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.1 -// protoc v5.29.2 +// protoc v3.21.12 // source: vxlan/vxlan.proto package vxlan diff --git a/vxlan/vxlan_grpc.pb.go b/vxlan/vxlan_grpc.pb.go index e883653..2c10892 100644 --- a/vxlan/vxlan_grpc.pb.go +++ b/vxlan/vxlan_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.2 +// - protoc v3.21.12 // source: vxlan/vxlan.proto package vxlan