Fix release makefile
This commit is contained in:
parent
fcddaabed2
commit
d33837ef38
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,6 @@
|
|||||||
.release-env
|
.release-env
|
||||||
|
CHANGELOG.md
|
||||||
|
.cache
|
||||||
virtual-vxlan.exe
|
virtual-vxlan.exe
|
||||||
virtual-vxlan
|
virtual-vxlan
|
||||||
dist
|
dist
|
||||||
|
@ -4,7 +4,8 @@ FROM ghcr.io/gythialy/golang-cross:$GO_BUILDER_VERSION
|
|||||||
|
|
||||||
RUN apt-get update; \
|
RUN apt-get update; \
|
||||||
apt-get --no-install-recommends -y -q install protobuf-compiler; \
|
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/protobuf/cmd/protoc-gen-go@latest; \
|
||||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@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"
|
||||||
|
21
Makefile
21
Makefile
@ -17,9 +17,8 @@ build-docker-image:
|
|||||||
|
|
||||||
.PHONY: deps
|
.PHONY: deps
|
||||||
deps:
|
deps:
|
||||||
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
|
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||||
go get -u github.com/git-chglog/git-chglog/cmd/git-chglog
|
go install golang.org/x/tools/cmd/goimports@latest
|
||||||
go get -u golang.org/x/tools/cmd/goimports
|
|
||||||
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||||
|
|
||||||
@ -37,32 +36,36 @@ generate:
|
|||||||
clean:
|
clean:
|
||||||
rm -rf virtual-vxlan* dist CHANGELOG.md
|
rm -rf virtual-vxlan* dist CHANGELOG.md
|
||||||
|
|
||||||
.PHONY: changelog
|
|
||||||
changelog:
|
|
||||||
git-chglog $(VERSION) > CHANGELOG.md
|
|
||||||
|
|
||||||
.PHONY: snapshot
|
.PHONY: snapshot
|
||||||
snapshot:
|
snapshot:
|
||||||
|
mkdir -p .cache/go
|
||||||
docker run \
|
docker run \
|
||||||
--rm --privileged \
|
--rm --privileged \
|
||||||
|
--user 1000:1000 \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
-v $(CURDIR):/go/src/$(PACKAGE_NAME) \
|
-v $(CURDIR):/go/src/$(PACKAGE_NAME) \
|
||||||
-v $(CURDIR)/sysroot:/sysroot \
|
-v $(CURDIR)/sysroot:/sysroot \
|
||||||
|
-v $(CURDIR)/.cache:/.cache \
|
||||||
|
-v $(CURDIR)/.cache/go:/go \
|
||||||
-w /go/src/$(PACKAGE_NAME) \
|
-w /go/src/$(PACKAGE_NAME) \
|
||||||
goreleaser-cross:latest \
|
goreleaser-cross:latest \
|
||||||
--clean --skip=publish --snapshot --verbose
|
--clean --skip=publish --snapshot --verbose
|
||||||
|
|
||||||
.PHONY: release
|
.PHONY: release
|
||||||
release: changelog
|
release:
|
||||||
|
mkdir -p .cache/go
|
||||||
docker run \
|
docker run \
|
||||||
--rm --privileged \
|
--rm --privileged \
|
||||||
|
--user 1000:1000 \
|
||||||
--env-file .release-env \
|
--env-file .release-env \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
-v $(CURDIR):/go/src/$(PACKAGE_NAME) \
|
-v $(CURDIR):/go/src/$(PACKAGE_NAME) \
|
||||||
-v $(CURDIR)/sysroot:/sysroot \
|
-v $(CURDIR)/sysroot:/sysroot \
|
||||||
|
-v $(CURDIR)/.cache:/.cache \
|
||||||
|
-v $(CURDIR)/.cache/go:/go \
|
||||||
-w /go/src/$(PACKAGE_NAME) \
|
-w /go/src/$(PACKAGE_NAME) \
|
||||||
goreleaser-cross:latest \
|
goreleaser-cross:latest \
|
||||||
--clean --release-notes=CHANGELOG.md
|
--clean --skip=validate
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint:
|
lint:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.36.1
|
// protoc-gen-go v1.36.1
|
||||||
// protoc v5.29.2
|
// protoc v3.21.12
|
||||||
// source: vxlan/vxlan.proto
|
// source: vxlan/vxlan.proto
|
||||||
|
|
||||||
package vxlan
|
package vxlan
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
// - protoc v5.29.2
|
// - protoc v3.21.12
|
||||||
// source: vxlan/vxlan.proto
|
// source: vxlan/vxlan.proto
|
||||||
|
|
||||||
package vxlan
|
package vxlan
|
||||||
|
Loading…
Reference in New Issue
Block a user