Skip to content

Commit

Permalink
chore: improve fxcored version cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
zakir-code committed May 24, 2024
1 parent fd40fd3 commit 0a03d2f
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
#!/usr/bin/make -f

BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
COMMIT := $(shell git log -1 --format='%H')

# don't override user values
ifeq (,$(VERSION))
ifeq ($(OS),Windows_NT)
VERSION := $(shell git describe --exact-match 2>$null)
else
VERSION := $(shell git describe --exact-match 2>/dev/null)
endif
# if VERSION is empty, then populate it with branch's name and raw commit hash
ifeq (,$(VERSION))
VERSION := $(BRANCH)-$(COMMIT)
endif
endif
VERSION := $(shell git describe --tags --always 2>/dev/null || echo 'unknown')
COMMIT := $(shell git log -1 --format='%H' 2>/dev/null || echo 'unknown')

LEDGER_ENABLED ?= true
BUILDDIR ?= $(CURDIR)/build
Expand Down

0 comments on commit 0a03d2f

Please sign in to comment.