зеркало из https://github.com/github/ruby.git
Revert "Update revision.h if branch unmatch not only revision"
This reverts commit 5a332940ed
.
Something does not work well on Github Actions.
This commit is contained in:
Родитель
26446cccc9
Коммит
e937878883
|
@ -429,19 +429,14 @@ endif
|
|||
|
||||
ifeq ($(HAVE_GIT),yes)
|
||||
REVISION_LATEST := $(shell $(CHDIR) $(srcdir) && $(GIT) log -1 --format=%H 2>/dev/null)
|
||||
BRANCH_LATEST := $(shell $(CHDIR) $(srcdir) && $(GIT) symbolic-ref --short HEAD 2>/dev/null)
|
||||
else
|
||||
REVISION_LATEST := update
|
||||
BRANCH_LATEST :=
|
||||
endif
|
||||
revision.h := $(wildcard $(srcdir)/revision.h revision.h)
|
||||
REVISION_IN_HEADER := $(if $(revision.h),\
|
||||
$(shell sed '/^\#define RUBY_FULL_REVISION "\(.*\)"/!d;s//\1/;q' $(revision.h)))
|
||||
BRANCH_IN_HEADER := $(if $(revision.h),\
|
||||
$(shell sed '/^\#define RUBY_BRANCH_NAME \(".*"\)/!d;s//\1/;s,.* // ,,;s/"//g;q' $(revision.h)))
|
||||
REVISION_IN_HEADER := $(if $(REVISION_IN_HEADER),$(REVISION_IN_HEADER),none)
|
||||
BRANCH_IN_HEADER := $(if $(BRANCH_IN_HEADER),$(BRANCH_IN_HEADER),...)
|
||||
ifneq ($(REVISION_IN_HEADER):$(BRANCH_IN_HEADER),$(REVISION_LATEST):$(BRANCH_LATEST))
|
||||
REVISION_IN_HEADER := $(shell sed '/^\#define RUBY_FULL_REVISION "\(.*\)"/!d;s//\1/;q' $(wildcard $(srcdir)/revision.h revision.h) /dev/null 2>/dev/null)
|
||||
ifeq ($(REVISION_IN_HEADER),)
|
||||
REVISION_IN_HEADER := none
|
||||
endif
|
||||
ifneq ($(REVISION_IN_HEADER),$(REVISION_LATEST))
|
||||
$(REVISION_H): PHONY
|
||||
endif
|
||||
|
||||
|
|
|
@ -256,9 +256,8 @@ class VCS
|
|||
if branch
|
||||
e = '..'
|
||||
name = branch.sub(/\A(.{#{limit-e.size}}).{#{e.size+1},}/o) {$1+e}
|
||||
(name = name.dump).gsub!(/\\#/, '#')
|
||||
comment = " // #{branch}" unless name == %["#{branch}"]
|
||||
code << "#define RUBY_BRANCH_NAME #{name}#{comment}"
|
||||
name = name.dump.sub(/\\#/, '#')
|
||||
code << "#define RUBY_BRANCH_NAME #{name}"
|
||||
end
|
||||
if title
|
||||
title = title.dump.sub(/\\#/, '#')
|
||||
|
|
Загрузка…
Ссылка в новой задаче