mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 11:37:06 +08:00
[airborne] add pprz_version and send it with BOOT
This commit is contained in:
+22
-1
@@ -76,6 +76,27 @@ else # not auto, explicitly specified
|
||||
NPROCS := $J
|
||||
endif
|
||||
|
||||
#
|
||||
# export paparazzi version
|
||||
#
|
||||
GIT_SHA1 := $(shell git log -1 --pretty=format:%H 2> /dev/null)
|
||||
ifneq ($(words $(GIT_SHA1)),1)
|
||||
GIT_SHA1 := "UNKNOWN"
|
||||
endif
|
||||
GIT_DESC := $(shell ./paparazzi_version)
|
||||
PPRZ_VER := $(shell echo $(GIT_DESC) | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')
|
||||
PPRZ_VER_MAJOR := $(shell echo $(GIT_DESC) | sed 's/v\([0-9]*\).*/\1/')
|
||||
PPRZ_VER_MINOR := $(shell echo $(GIT_DESC) | sed 's/v[0-9]*.\([0-9]*\).*/\1/')
|
||||
PPRZ_VER_PATCH := $(shell echo $(GIT_DESC) | sed 's/v[0-9]*.[0-9]*.\([0-9]*\).*/\1/')
|
||||
ifneq ($(words $(PPRZ_VER_PATCH)),1)
|
||||
PPRZ_VER_PATCH := 0
|
||||
endif
|
||||
export GIT_DESC
|
||||
export GIT_SHA1
|
||||
export PPRZ_VER_MAJOR
|
||||
export PPRZ_VER_MINOR
|
||||
export PPRZ_VER_PATCH
|
||||
|
||||
|
||||
# "make Q=''" to get full echo
|
||||
Q=@
|
||||
@@ -105,7 +126,7 @@ init:
|
||||
|
||||
print_version:
|
||||
@echo "-----------------------------------------------------------------------"
|
||||
@echo "Paparazzi version" $(shell ./paparazzi_version)
|
||||
@echo "Paparazzi version" $(GIT_DESC)
|
||||
@echo "-----------------------------------------------------------------------"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user