Skip to content

Commit 79a294b

Browse files
committed
SimonStewart: Modify the build to get the git revision and stash that in the BuildInfo
1 parent 67ccba0 commit 79a294b

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

rake-tasks/checks.rb

+2-15
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,6 @@ def AndroidSDK?
145145
$androidSDK
146146
end
147147

148-
# Not everyone is using a command-line subversion client.
149-
def svn?
150-
present?('svn')
151-
end
152-
153-
def svn_revision
154-
@svn_revision ||= (
155-
output = if File.directory?(".svn") && svn?
156-
`svn info`
157-
elsif File.directory?(".git") && present?("git")
158-
`git svn info`
159-
end
160-
161-
output.to_s[/Revision: (\d+)/, 1] || 'unknown'
162-
)
148+
def vcs_revision
149+
@vcs_revision ||= `git rev-parse --short HEAD`
163150
end

rake-tasks/crazy_fun/mappings/java.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def ant_java_task(task_name, classname, cp, args = nil, props = {})
187187
def modify_manifest(manifest)
188188
manifest.section(:name => 'Build-Info') do |section|
189189
section.attribute(:name => 'Selenium-Version', :value => version)
190-
section.attribute(:name => 'Selenium-Revision', :value => svn_revision)
190+
section.attribute(:name => 'Selenium-Revision', :value => vcs_revision)
191191
section.attribute(:name => 'Selenium-Build-Time', :value => Time.new.gmtime.strftime('%F %T'))
192192
end
193193
end

0 commit comments

Comments
 (0)