Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Change version to include build time and commit id of libswiftnav #708

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,18 @@ CPPWARN = -Wall -Wextra -Werror
#

# List all default C defines here, like -D_DEBUG=1
GIT_VERSION := $(shell git describe --dirty)
# Form version number to include last tag, build time (month, day, hours, minutes)
# and commit ids of piksi_firmware and libswiftnav repositories.
# Example: v0.21-05271044-4293c57-f82b1f4
GIT_VERSION := $(shell git describe --abbrev=0)
GIT_VERSION += $(shell date +%m%d%H%M)
GIT_VERSION += $(shell git rev-parse --short=7 HEAD)
GIT_VERSION += $(shell git -C ../libswiftnav rev-parse --short=7 HEAD)
dash := -
empty :=
space := $(empty) $(empty)
GIT_VERSION := $(subst $(space),$(dash),$(GIT_VERSION))

DDEFS = -DGIT_VERSION="\"$(GIT_VERSION)\""

# List all default ASM defines here, like -D_DEBUG=1
Expand Down