Skip to content

Commit

Permalink
Make ant file optional via 'play antify'
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumebort committed May 25, 2011
1 parent bb141a6 commit 0c1f853
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions framework/pym/play/commands/ant.py
@@ -0,0 +1,25 @@
import os, os.path
import shutil
import time

from play.utils import *

COMMANDS = ['antify']

HELP = {
'antify': 'Create a build.xml file for this project'
}

def execute(**kargs):
app = kargs.get("app")
args = kargs.get("args")
play_env = kargs.get("env")

is_application = os.path.exists(os.path.join(app.path, 'conf', 'application.conf'))
app.check()

shutil.copyfile(os.path.join(play_env["basedir"], 'resources/build.xml'), os.path.join(app.path, 'build.xml'))

print "~ OK, a build.xml file has been created"
print "~ Define the PLAY_PATH env property, and use it with ant run|start|stop"
print "~"
File renamed without changes.

0 comments on commit 0c1f853

Please sign in to comment.