diff --git a/tool/format-release b/tool/format-release index 72fc173000371d..927a35d58c23de 100755 --- a/tool/format-release +++ b/tool/format-release @@ -65,11 +65,17 @@ eom elsif y != 0 prev_tag = "v#{x}_#{y-1}_0" prev_ver = "#{x}.#{y-1}.0" - elsif x == 3 && y == 0 && z == 0 - prev_tag = "v2_7_0" - prev_ver = "2.7.0" - else - raise "unexpected version for prev_ver '#{version}'" + else # y == 0 && z == 0 + case x + when 3 + prev_tag = "v2_7_0" + prev_ver = "2.7.0" + when 4 + prev_tag = "v3_4_0" + prev_ver = "3.4.0" + else + raise "it doesn't know what is the previous version of '#{version}'" + end end uri = "https://cache.ruby-lang.org/pub/tmp/ruby-info-#{version}-draft.yml" diff --git a/tool/test/test_commit_email.rb b/tool/test/test_commit_email.rb index ffe28b8e57d28b..c7031f6c6ef818 100644 --- a/tool/test/test_commit_email.rb +++ b/tool/test/test_commit_email.rb @@ -8,6 +8,8 @@ class TestCommitEmail < Test::Unit::TestCase STDIN_DELIMITER = "---\n" def setup + omit 'git command is not available' unless system('git', '--version', out: File::NULL, err: File::NULL) + @ruby = Dir.mktmpdir Dir.chdir(@ruby) do git('init', '--initial-branch=master') diff --git a/version.c b/version.c index 0a3bc7bf9b91ae..b9c57a71b82b17 100644 --- a/version.c +++ b/version.c @@ -31,13 +31,15 @@ # endif # define RUBY_REVISION_STR " "RUBY_BRANCH_NAME" "RUBY_REVISION # else -# define RUBY_API_VERSION_NAME RUBY_API_VERSION_STR # define RUBY_REVISION_STR " revision "RUBY_REVISION # endif #else # define RUBY_REVISION "HEAD" # define RUBY_REVISION_STR "" #endif +#ifndef RUBY_API_VERSION_NAME +# define RUBY_API_VERSION_NAME RUBY_API_VERSION_STR +#endif #if !defined RUBY_RELEASE_DATETIME || RUBY_PATCHLEVEL != -1 # undef RUBY_RELEASE_DATETIME # define RUBY_RELEASE_DATETIME RUBY_RELEASE_DATE