From d85898d16f11d4bf8f625ddfbdbcd865230e3e4a Mon Sep 17 00:00:00 2001 From: Jason Mobarak Date: Thu, 12 May 2022 15:10:10 -0700 Subject: [PATCH] make: add commands to detect staging --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 22efc915e1..aca19baef8 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,9 @@ SBP_TESTS_SPEC_DIR := $(SWIFTNAV_ROOT)/spec/tests/yaml/ GENENV ?= py # the system's default python version SBP_GEN_BIN := tox -e $(GENENV) -- -SBP_VERSION := $(shell git describe --always --tags) +SBP_VERSION := $(shell git describe --match 'v*' --always --tags) SBP_VERSION_UNPREFIXED := $(shell echo $(SBP_VERSION) | sed 's/^v//') +SBP_STAGING := $(shell git describe --match 'libsbp-staging*' --always --tags | grep -q '^libsbp-staging' && echo 1 || echo 0) CHANGELOG_MAX_ISSUES := 100 @@ -504,3 +505,7 @@ spec-validator-test: python -m mypy --install scripts/spec_validator.py python -m black --check scripts/spec_validator.py ./scripts/validation_test_harness.bash 2>&1 | grep -E 'PASS|FAIL' + +version: + @echo "SBP version: $(SBP_VERSION)" + @echo "SBP is staging: $(SBP_STAGING)"