forked from TrueCloudLab/frostfs-node
Makefile: Add Gerrit-related targets
This commit adds helper targets to easily setup an existing repo for work with Gerrit. Change-Id: I0696eb8ea84cc16a9482be6a2fb0382fe624bb96 Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
45b7796151
commit
affab25512
1 changed files with 14 additions and 0 deletions
14
Makefile
14
Makefile
|
@ -186,6 +186,20 @@ test:
|
|||
@echo "⇒ Running go test"
|
||||
@GOFLAGS="$(GOFLAGS)" go test ./...
|
||||
|
||||
# Install Gerrit commit-msg hook
|
||||
review-install: GIT_HOOK_DIR := $(shell git rev-parse --git-dir)/hooks
|
||||
review-install:
|
||||
@git config remote.review.url \
|
||||
|| git remote add review ssh://review.frostfs.info:2222/TrueCloudLab/frostfs-node
|
||||
@mkdir -p $(GIT_HOOK_DIR)/
|
||||
@curl -Lo $(GIT_HOOK_DIR)/commit-msg https://review.frostfs.info/tools/hooks/commit-msg
|
||||
@chmod +x $(GIT_HOOK_DIR)/commit-msg
|
||||
|
||||
# Create a PR in Gerrit
|
||||
review: BRANCH ?= master
|
||||
review:
|
||||
@git push review HEAD:refs/for/$(BRANCH)
|
||||
|
||||
# Run pre-commit
|
||||
pre-commit-run:
|
||||
@pre-commit run -a --hook-stage manual
|
||||
|
|
Loading…
Add table
Reference in a new issue