зеркало из https://github.com/github/ruby.git
common.mk: update-man-date
* common.mk (update-man-date): update last date in man pages. * tool/vcs.rb (VCS#modified): returns last modified time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
80000c534c
Коммит
aaa123591d
|
@ -1023,6 +1023,12 @@ yes-test-all: sudo-precheck
|
|||
sudo-precheck: PHONY
|
||||
@$(SUDO) echo > $(NULL)
|
||||
|
||||
update-man-date: PHONY
|
||||
-$(Q) $(BASERUBY) -I"$(srcdir)/tool" -rvcs -i -p \
|
||||
-e 'BEGIN{@vcs=VCS.detect(ARGV.shift)}' \
|
||||
-e '$$_.sub!(/^(\.Dd ).*/){$$1+@vcs.modified(ARGF.path).strftime("%B %d, %Y")}' \
|
||||
"$(srcdir)" "$(srcdir)"/man/*.1
|
||||
|
||||
help: PHONY
|
||||
$(MESSAGE_BEGIN) \
|
||||
" Makefile of Ruby" \
|
||||
|
|
|
@ -130,6 +130,11 @@ class VCS
|
|||
return last, changed, modified, *rest
|
||||
end
|
||||
|
||||
def modified(path)
|
||||
last, changed, modified, *rest = get_revisions(path)
|
||||
modified
|
||||
end
|
||||
|
||||
def relative_to(path)
|
||||
if path
|
||||
srcdir = File.realpath(@srcdir)
|
||||
|
|
Загрузка…
Ссылка в новой задаче