Răsfoiți Sursa

+ include -unpushed in revision.inc if not all changes are pushed to the remote

(cherry picked from commit 4c1eb4e454ad8215e6cfd855c2b90cb5698ec1f2)
florian 4 ani în urmă
părinte
comite
d48e34a81d
2 a modificat fișierele cu 6 adăugiri și 0 ștergeri
  1. 3 0
      compiler/Makefile
  2. 3 0
      compiler/Makefile.fpc

+ 3 - 0
compiler/Makefile

@@ -501,6 +501,9 @@ ifneq ($(wildcard ../.git),)
 ifneq ($(GIT),)
 ifneq ($(GIT),)
 GITDESCRIBE=$(shell $(GIT) describe --dirty)
 GITDESCRIBE=$(shell $(GIT) describe --dirty)
 REVSTR:=$(word 2,$(subst -, ,$(GITDESCRIBE)))-$(word 3,$(subst -, ,$(GITDESCRIBE)))
 REVSTR:=$(word 2,$(subst -, ,$(GITDESCRIBE)))-$(word 3,$(subst -, ,$(GITDESCRIBE)))
+ifneq (git log @{u}..,)
+REVSTR:=$(REVSTR)-unpushed
+endif
 ifneq ($(word 4,$(subst -, ,$(GITDESCRIBE))),)
 ifneq ($(word 4,$(subst -, ,$(GITDESCRIBE))),)
 REVSTR:=$(REVSTR)-$(word 4,$(subst -, ,$(GITDESCRIBE)))
 REVSTR:=$(REVSTR)-$(word 4,$(subst -, ,$(GITDESCRIBE)))
 endif
 endif

+ 3 - 0
compiler/Makefile.fpc

@@ -246,6 +246,9 @@ ifneq ($(wildcard ../.git),)
 ifneq ($(GIT),)
 ifneq ($(GIT),)
 GITDESCRIBE=$(shell $(GIT) describe --dirty)
 GITDESCRIBE=$(shell $(GIT) describe --dirty)
 REVSTR:=$(word 2,$(subst -, ,$(GITDESCRIBE)))-$(word 3,$(subst -, ,$(GITDESCRIBE)))
 REVSTR:=$(word 2,$(subst -, ,$(GITDESCRIBE)))-$(word 3,$(subst -, ,$(GITDESCRIBE)))
+ifneq (git log @{u}..,)
+REVSTR:=$(REVSTR)-unpushed
+endif
 ifneq ($(word 4,$(subst -, ,$(GITDESCRIBE))),)
 ifneq ($(word 4,$(subst -, ,$(GITDESCRIBE))),)
 REVSTR:=$(REVSTR)-$(word 4,$(subst -, ,$(GITDESCRIBE)))
 REVSTR:=$(REVSTR)-$(word 4,$(subst -, ,$(GITDESCRIBE)))
 endif
 endif