Skip to content

Instantly share code, notes, and snippets.

@jdlich
Created March 7, 2012 21:24
Show Gist options
  • Save jdlich/1996336 to your computer and use it in GitHub Desktop.
Save jdlich/1996336 to your computer and use it in GitHub Desktop.
#
# 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