Created
July 26, 2012 18:08
-
-
Save jamiejackson/3183573 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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