Last active
July 5, 2023 03:17
-
-
Save gebv/3d1a13a765a113b8e874bbf245c068b3 to your computer and use it in GitHub Desktop.
Useful Makefile tasks (replenishable gist)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CHANGELOG ?= docker run --rm \ | |
-v ${PWD}:/workdir \ | |
-w /workdir \ | |
quay.io/git-chglog/git-chglog | |
PROTOC ?= docker run --rm -u ${shell id -u} \ | |
-v ${PWD}:/defs namely/protoc-all:1.51_1 \ | |
-l go \ | |
--with-validator \ | |
-o ./ \ | |
-i ./proto | |
gen-changelog: | |
# to update the changelog according to the future version | |
# VERSION=XXX make changelog | |
# otherwise | |
# make changelog | |
# will result in putting everything after the last tag into unreleased | |
ifeq ($(VERSION),) | |
$(CHANGELOG) -o CHANGELOG.md | |
else | |
$(CHANGELOG) --next-tag $(VERSION) -o CHANGELOG.md | |
endif | |
gen-proto: | |
# protobuf / gRPC | |
mkdir -p ./api/v1 | |
find ./api/v1 -name '*.pb.*go' -delete | |
$(PROTOC) \ | |
-d ./proto/v1_foo.proto | |
$(PROTOC) \ | |
-d ./proto/v1_bar.proto |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment