Skip to content

@jamiejackson /warbler.rb
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Warbler::Config.new do |config|
def create_war_name
begin
svn_url = `svn info --xml | xmllint --xpath /info/entry/url/text\\(\\) -`
svn_branch = svn_url.match(/https:\/\/myrepodomain\/svn\/general\/cwo_datasite\/(branches\/)?([^\/]*)\/cwo_data/)[2]
svn_revision = `svnversion .`.strip
svn_token = svn_branch + "~r" + svn_revision
puts "[" + svn_token + "]"
rescue
svn_token = "unknown_revision"
end
time_token = Time.new.strftime("%Y%m%d_%H%M")
puts "[" + time_token + "]"
war_name = "cwo_data_site" + "." + svn_token + "." + time_token
return war_name
end
def get_war_name
@war_name ||= create_war_name
end
config.jar_name = get_war_name
config.webxml.jruby.min.runtimes = 6
config.webxml.jruby.max.runtimes = 6
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.