1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-19 09:54:15 +01:00

OP-1160 use commit.template config instead of a hook.

Added also a _clean target to unset that config

+review OPReview-611
This commit is contained in:
Alessio Morale 2014-01-14 09:42:04 +01:00
parent 6a3c5d05c7
commit c9fad94b51
4 changed files with 21 additions and 21 deletions

View File

@ -1,23 +1,21 @@
#
# *************** 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.
#
# Before committing, ensure your code is properly formatted using:
# make uncrustify_all
# You can format flight or ground code only using respectively
# uncrustify_flight or uncrustify_ground
#
# 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
# For example "+review OPReview-609"
#
# *NOTE* leave an empty line between the commit message and "smart commit command"
# Smart commits commands need to starts immediately at first column

View File

@ -860,7 +860,7 @@ help:
@$(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) " prepare - Install GIT commit message templates"
@$(ECHO) " [Tool Installers]"
@$(ECHO) " arm_sdk_install - Install the GNU ARM gcc toolchain"
@$(ECHO) " qt_sdk_install - Install the QT development tools"

View File

@ -1,4 +0,0 @@
#!/bin/sh
# Append instructions on how to format a commit message
cat "$GIT_DIR/hooks/msg_template.txt" >> $1
#

View File

@ -948,12 +948,18 @@ android_sdk_update:
$(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) --remove-destination "$(ROOT_DIR)/make/git-hooks"/* "$(ROOT_DIR)/.git/hooks/"
.PHONY: prepare
prepare:
$(V0) @echo " Configuring GIT commit template"
$(V1) $(CD) "$(ROOT_DIR)"
$(V1) $(GIT) config commit.template .commit-template
.PHONY: prepare_clean
prepare_clean:
$(V0) @echo " Cleanup GIT commit template configuration"
$(V1) $(CD) "$(ROOT_DIR)"
$(V1) $(GIT) config --unset commit.template
##############################
#