Skip to content

Commit

Permalink
enable passing in revision string to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
tblaha committed Nov 6, 2024
1 parent 291993c commit 057c870
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ logs/

# remote definition
remote.env
.githash
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,19 @@ endif

include $(ROOT)/make/targets.mk

REVISION ?=

ifeq ($(REVISION),)
GITHASH := $(shell git log -1 --format="%h")
DIRTYFLAG =
ifneq ($(shell git diff --shortstat),)
DIRTYFLAG = +dirty
endif
REVISION := $(GITHASH)$(DIRTYFLAG)
REVISION = $(GITHASH)$(DIRTYFLAG)
endif

check_dirty :
ifneq ($(shell git diff --shortstat),)
ifneq (,$(findstring dirty,$(REVISION)))
ifeq ($(TARGET), MOCKUP)
@echo "Uncommited changes. Continuing with build!"
else
Expand Down

0 comments on commit 057c870

Please sign in to comment.