Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkMatterCore committed May 1, 2024
1 parent 9cdbbf0 commit 3356bfa
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,22 @@ include $(DEVKITPRO)/libnx/switch_rules

ROOTDIR ?= $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))

GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
GIT_COMMIT := $(shell git rev-parse --short HEAD)
GIT_BRANCH := $(strip $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null))
GIT_COMMIT := $(strip $(shell git rev-parse --short HEAD 2>/dev/null))
GIT_REV := ${GIT_BRANCH}-${GIT_COMMIT}

ifneq (,$(strip $(shell git status --porcelain 2>/dev/null)))
GIT_REV := $(GIT_REV)-dirty
endif

ifeq (,$(GIT_BRANCH))
$(error GIT_BRANCH is empty)
endif

ifeq (,$(GIT_COMMIT))
$(error GIT_COMMIT is empty)
endif

VERSION_MAJOR := 2
VERSION_MINOR := 0
VERSION_MICRO := 0
Expand Down

0 comments on commit 3356bfa

Please sign in to comment.