mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Merge remote-tracking branch 'origin/amorale/OP-1160_add_prepare_target_and_hooks' into next
This commit is contained in:
commit
e58f66db73
23
.commit-template
Normal file
23
.commit-template
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# *************** OpenPilot commits guidelines ***************
|
||||
# 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
|
||||
# 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
|
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 commit message template"
|
||||
@$(ECHO) " [Tool Installers]"
|
||||
@$(ECHO) " arm_sdk_install - Install the GNU ARM gcc toolchain"
|
||||
@$(ECHO) " qt_sdk_install - Install the QT development tools"
|
||||
|
@ -264,7 +264,7 @@ GCS_LIBRARY_PATH
|
||||
ssleay32.dll \
|
||||
libeay32.dll
|
||||
for(dll, OPENSSL_DLLS) {
|
||||
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$(OPENSSL)/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline()
|
||||
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$(OPENSSL_DIR)/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline()
|
||||
}
|
||||
|
||||
data_copy.target = FORCE
|
||||
|
@ -45,6 +45,7 @@ recursive()
|
||||
case "$1" in
|
||||
*.c|*.h|*.cc|*.cpp|*.hpp)
|
||||
${UNCRUSTIFY} -c "${UNCRUSTIFY_CONFIG}" --no-backup "$1"
|
||||
${UNCRUSTIFY} -c "${UNCRUSTIFY_CONFIG}" --no-backup "$1" -q
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
@ -564,12 +564,16 @@ ifeq ($(UNAME), Windows)
|
||||
$(eval $(call TOOL_INSTALL_TEMPLATE,openssl,$(OPENSSL_DIR),$(OPENSSL_URL),$(notdir $(OPENSSL_URL))))
|
||||
|
||||
ifeq ($(shell [ -d "$(OPENSSL_DIR)" ] && $(ECHO) "exists"), exists)
|
||||
export OPENSSL := $(OPENSSL_DIR)
|
||||
export OPENSSL := "$(OPENSSL_DIR)/bin/openssl"
|
||||
export OPENSSL_DIR := "$(OPENSSL_DIR)"
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
# $(info $(EMPTY) WARNING $(call toprel, $(OPENSSL_DIR)) not found (make openssl_install), using system PATH)
|
||||
endif
|
||||
|
||||
.PHONY: openssl_version
|
||||
openssl_version:
|
||||
-$(V1) $(ECHO) "OpenSSL `$(OPENSSL) version`"
|
||||
endif
|
||||
|
||||
##############################
|
||||
@ -947,6 +951,19 @@ 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 " 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
|
||||
|
||||
##############################
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user