summaryrefslogtreecommitdiff
path: root/tool/lib/vcs.rb
diff options
context:
space:
mode:
-rw-r--r--tool/lib/vcs.rb22
1 files changed, 18 insertions, 4 deletions
@@ -95,6 +95,15 @@ class VCS
opts
end
attr_reader :srcdir
def initialize(path)
@@ -204,7 +213,8 @@ class VCS
revision_handler(rev).short_revision(rev)
end
- def revision_header(last, modified = nil, branch = nil, title = nil, limit: 20)
short = short_revision(last)
if /[^\x00-\x7f]/ =~ title and title.respond_to?(:force_encoding)
title = title.dup.force_encoding("US-ASCII")
@@ -225,10 +235,11 @@ class VCS
title = title.dump.sub(/\\#/, '#')
code << "#define RUBY_LAST_COMMIT_TITLE #{title}"
end
- if modified
- t = modified.utc
code << t.strftime('#define RUBY_RELEASE_DATETIME "%FT%TZ"')
end
code
end
@@ -386,7 +397,10 @@ class VCS
end
class GIT < self
- register(".git") {|path, dir| File.exist?(File.join(path, dir))}
COMMAND = ENV["GIT"] || 'git'
def cmd_args(cmds, srcdir = nil)