Created
March 7, 2012 21:24
-
-
Save jdlich/1996336 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
# | |
# generate ant tasks | |
# | |
def uportal command | |
Dir.chdir(UPORTAL) { system command } | |
end | |
def ant_tasks | |
# TODO: check for build.properties | |
# parse `ant -p` stdout | |
Dir.chdir(UPORTAL) { `ant -p` }.split("\n").map do |task| | |
task[/(^\s{1})([a-z]\S+)/, 2] | |
end.compact | |
end | |
ant_tasks.each do |task| | |
task task do | |
uportal "ant #{task}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment