fix ATMOSPHERE_GIT_BRANCH if use tag

This commit is contained in:
Peter Galonza 2024-05-16 02:18:00 +03:00
parent 3e254e39e5
commit 9e5342689e

View file

@ -231,7 +231,11 @@ endif
#---------------------------------------------------------------------------------
# get atmosphere git revision information
#---------------------------------------------------------------------------------
export ATMOSPHERE_GIT_BRANCH := $(shell git symbolic-ref --short HEAD)
ifneq ($(strip $(shell git symbolic-ref --short HEAD 2>/dev/null)),)
export ATMOSPHERE_GIT_BRANCH := $(shell git symbolic-ref --short HEAD)
else
export ATMOSPHERE_GIT_BRANCH := notbranch
endif
ifeq ($(strip $(shell git status --porcelain 2>/dev/null)),)
export ATMOSPHERE_GIT_REVISION := $(ATMOSPHERE_GIT_BRANCH)-$(shell git rev-parse --short HEAD)