Skip to content

Commit

Permalink
Makefile: Add OPL_VERSION based on git tags an format change
Browse files Browse the repository at this point in the history
OPL_VERSION format slightly changed:

from (example):
  1.0.0.1598-Beta-2f39094-dirty-localversion

to (example):
  v1.0.0-Beta-1598-2f39094-dirty-localversion
  • Loading branch information
rickgaiser committed Jan 2, 2021
1 parent 3e92281 commit 89d6225
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,14 @@ ifneq ($(shell test -d .git; echo $$?),0)
DIRTY = -dirty
endif

OPL_VERSION = $(VERSION).$(SUBVERSION).$(PATCHLEVEL).$(REVISION)$(if $(EXTRAVERSION),-$(EXTRAVERSION))$(if $(GIT_HASH),-$(GIT_HASH))$(if $(DIRTY),$(DIRTY))$(if $(LOCALVERSION),-$(LOCALVERSION))
GIT_TAG = $(shell git describe --exact-match --tags 2>/dev/null)
ifeq ($(GIT_TAG),)
# git revision is not tagged
OPL_VERSION = v$(VERSION).$(SUBVERSION).$(PATCHLEVEL)$(if $(EXTRAVERSION),-$(EXTRAVERSION))-$(REVISION)$(if $(GIT_HASH),-$(GIT_HASH))$(if $(DIRTY),$(DIRTY))$(if $(LOCALVERSION),-$(LOCALVERSION))
else
# git revision is tagged
OPL_VERSION = $(GIT_TAG)$(if $(DIRTY),$(DIRTY))
endif

FRONTEND_OBJS = pad.o fntsys.o renderman.o menusys.o OSDHistory.o system.o lang.o config.o hdd.o dialogs.o \
dia.o ioman.o texcache.o themes.o supportbase.o usbsupport.o ethsupport.o hddsupport.o \
Expand Down

0 comments on commit 89d6225

Please sign in to comment.