瀏覽代碼

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

(cherry picked from commit 4c1eb4e454ad8215e6cfd855c2b90cb5698ec1f2)
florian 4 年之前
父節點
當前提交
d48e34a81d
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 3 0
      compiler/Makefile
  2. 3 0
      compiler/Makefile.fpc

+ 3 - 0
compiler/Makefile

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

+ 3 - 0
compiler/Makefile.fpc

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