[前][次][番号順一覧][スレッド一覧]

ruby-changes:38533

From: nobu <ko1@a...>
Date: Sat, 23 May 2015 18:36:38 +0900 (JST)
Subject: [ruby-changes:38533] nobu:r50614 (trunk): common.mk: update-man-date

nobu	2015-05-23 18:36:33 +0900 (Sat, 23 May 2015)

  New Revision: 50614

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50614

  Log:
    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.

  Modified files:
    trunk/common.mk
    trunk/tool/vcs.rb
Index: common.mk
===================================================================
--- common.mk	(revision 50613)
+++ common.mk	(revision 50614)
@@ -1023,6 +1023,12 @@ yes-test-all: sudo-precheck https://github.com/ruby/ruby/blob/trunk/common.mk#L1023
 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+@v...(ARGF.path).strftime("%B %d, %Y")}' \
+	"$(srcdir)" "$(srcdir)"/man/*.1
+
 help: PHONY
 	$(MESSAGE_BEGIN) \
 	"                Makefile of Ruby" \
Index: tool/vcs.rb
===================================================================
--- tool/vcs.rb	(revision 50613)
+++ tool/vcs.rb	(revision 50614)
@@ -130,6 +130,11 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L130
     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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]