summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-03 08:55:52 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-03 08:55:52 +0000
commit7968f885a0149504dc9799f7b762e7c1181e9ab7 (patch)
tree8cf5c486206b7e89762dfa78624722709f6de404 /tool
parent1e4550ac03ac72c3229eb6eca446059616a02b92 (diff)
add teenyup
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-xtool/merger.rb30
1 files changed, 19 insertions, 11 deletions
diff --git a/tool/merger.rb b/tool/merger.rb
index 45880e0..54ac142 100755
--- a/tool/merger.rb
+++ b/tool/merger.rb
@@ -5,7 +5,6 @@ exec "${RUBY-ruby}" "-x" "$0" "$@" && [ ] if false
# This needs ruby 1.9 and subversion.
# run this in a repository to commit.
-require 'date'
require 'tempfile'
$repos = 'svn+ssh://svn@ci.ruby-lang.org/ruby/'
@@ -25,6 +24,9 @@ def help
\e[1mrevision increment\e[0m
ruby #$0 revisionup
+\e[1mteeny increment\e[0m
+ ruby #$0 teenyup
+
\e[1mtagging major release\e[0m
ruby #$0 tag 2.2.0
@@ -67,11 +69,19 @@ def interactive str, editfile = nil
end
end
-def version_up
- d = DateTime.now
- d = d.new_offset(Rational(9,24)) # we need server locale (i.e. japanese) time
+def version_up(inc=nil)
+ d = Time.now
+ d = d.localtime(9*60*60) # server is Japan Standard Time +09:00
system(*%w'svn revert version.h')
- v, p = version
+ v, pl = version
+
+ if inc == :teeny
+ v[2].succ!
+ else # patchlevel
+ if pl != "-1"
+ pl.succ!
+ end
+ end
teeny = v[2]
case v
@@ -79,11 +89,6 @@ def version_up
teeny = 1
end
- p = p.to_i
- if p != -1
- p += 1
- end
-
str = open 'version.h', 'rb' do |f| f.read end
[%W[RUBY_VERSION "#{v.join '.'}"],
%W[RUBY_VERSION_CODE #{v.join ''}],
@@ -92,7 +97,7 @@ def version_up
%W[RUBY_VERSION_TEENY #{teeny}],
%W[RUBY_RELEASE_DATE "#{d.strftime '%Y-%m-%d'}"],
%W[RUBY_RELEASE_CODE #{d.strftime '%Y%m%d'}],
- %W[RUBY_PATCHLEVEL #{p}],
+ %W[RUBY_PATCHLEVEL #{pl}],
%W[RUBY_RELEASE_YEAR #{d.year}],
%W[RUBY_RELEASE_MONTH #{d.month}],
%W[RUBY_RELEASE_DAY #{d.day}],
@@ -151,6 +156,9 @@ def default_merge_branch
end
case ARGV[0]
+when "teenyup"
+ version_up(:teeny)
+ system 'svn diff version.h'
when "up", /\A(ver|version|rev|revision|lv|level|patch\s*level)\s*up/
version_up
system 'svn diff version.h'