mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-19 09:54:15 +01:00
OP-1160 Add a prepare make target that installs a prepare-commit-msg hook and
a text file containing the commit message template addition.
This commit is contained in:
parent
f2bc6508c4
commit
ad8f4fe41c
2
Makefile
2
Makefile
@ -859,6 +859,8 @@ help:
|
||||
@$(ECHO)
|
||||
@$(ECHO) " Here is a summary of the available targets:"
|
||||
@$(ECHO)
|
||||
@$(ECHO) " [Source tree preparation]"
|
||||
@$(ECHO) " prepare - Install GIT hooks under the right .git/hooks"
|
||||
@$(ECHO) " [Tool Installers]"
|
||||
@$(ECHO) " arm_sdk_install - Install the GNU ARM gcc toolchain"
|
||||
@$(ECHO) " qt_sdk_install - Install the QT development tools"
|
||||
|
23
make/git-hooks/msg_template.txt
Normal file
23
make/git-hooks/msg_template.txt
Normal file
@ -0,0 +1,23 @@
|
||||
#
|
||||
# *************** OpenPilot commits guidelines ***************
|
||||
#
|
||||
# Before committing, ensure your code is properly formatted
|
||||
# you can do that using:
|
||||
# make uncrustify_all
|
||||
# you can format only flight or ground side code using respectively
|
||||
# uncrustify_flight or uncrustify_ground
|
||||
#
|
||||
# Each commit needs to have a message like the following sample:
|
||||
# OP-1150 UI for thermal calibration: Connect State machine to UI
|
||||
#
|
||||
# It needs to begin with a reference to one or more Jira tickets followed by a short description.
|
||||
# If needed add a longer description in the following lines, after an empty line.
|
||||
#
|
||||
# To automatically create a review, append the following smart commit messages:
|
||||
# +review OPReview
|
||||
#
|
||||
# To append the commit to an existing review, use the following smart commit message:
|
||||
# +review OPReview-NNN
|
||||
# Where NNN is the id of the review i.e. "+review OPReview-609"
|
||||
# *NOTE* insert smart commit messages leaving an empty line from the previous text
|
||||
# starting immediately at first column
|
4
make/git-hooks/prepare-commit-msg
Normal file
4
make/git-hooks/prepare-commit-msg
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
# Append instructions on how to format a commit message
|
||||
cat "$GIT_DIR/hooks/msg_template.txt" >> $1
|
||||
#
|
@ -947,6 +947,13 @@ android_sdk_update:
|
||||
$(V0) @echo " UPDATE $(ANDROID_SDK_DIR)"
|
||||
$(ANDROID_SDK_DIR)/tools/android update sdk --no-ui -t platform-tools,android-16,addon-google_apis-google-16
|
||||
|
||||
#Install git hooks under the right folder
|
||||
.PHONY: prepare
|
||||
|
||||
prepare:
|
||||
$(V0) @echo " Installing GIT hooks under $(ROOT_DIR)/.git/hooks"
|
||||
$(V1) $(CP) "$(ROOT_DIR)/make/git-hooks"/* "$(ROOT_DIR)/.git/hooks/"
|
||||
|
||||
|
||||
##############################
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user