forked from playframework/play1
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make ant file optional via 'play antify'
- Loading branch information
1 parent
bb141a6
commit 0c1f853
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.