1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* common.mk (change), tool/change_maker.rb: make a brief template

for ChangeLog.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-05-24 03:52:46 +00:00
parent ccba83feff
commit e16c316b52
3 changed files with 35 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Mon May 24 12:52:44 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* common.mk (change), tool/change_maker.rb: make a brief template
for ChangeLog.
Mon May 24 09:19:59 2010 NAKAMURA Usaku <usa@ruby-lang.org>
* gc.c (gc_sweep): suppres a warning on VC.

View file

@ -816,6 +816,9 @@ info-libruby_so:
info-arch:
@echo arch=$(arch)
change:
$(BASERUBY) -C "$(srcdir)" ./tool/change_maker.rb $(CHANGES) > change.log
help: PHONY
@echo " Makefile of Ruby"
@echo ""
@ -839,6 +842,7 @@ help: PHONY
@echo " install: install all ruby distributions"
@echo " install-nodoc: install without rdoc"
@echo " clean: clean built objects"
@echo " change: make change log template"
@echo " golf: for golfers"
@echo ""
@echo "see DeveloperHowto for more detail: "

26
tool/change_maker.rb Executable file
View file

@ -0,0 +1,26 @@
#! ./miniruby
if File.directory?(".svn")
cmd = "svn diff"
elsif File.directory?(".git")
cmd = "git diff"
else
abort "does not seem to be under a vcs"
end
def diff2index(cmd, *argv)
path = nil
`#{cmd} #{argv.join(" ")}`.split(/\n/).each do |line|
case line
when /^Index: (\S*)/, /^diff --git [a-z]\/(\S*) [a-z]\/\1/
path = $1
when /^@@.*@@ +([A-Za-z_][A-Za-z_0-9 ]*[A-Za-z_0-9])/
puts "* #{path} (#{$1}):"
end
end
!!path
end
if !diff2index(cmd, ARGV) and /^git/ =~ cmd
diff2index(cmd, "--cached", ARGV)
end