set absolute path in ant build.xml
I'm working with the html5boilerplate build script and ideally I'd like to have the build process deploy files outside of the project directory.
What I want to do on build is deploy my project as a Wordpress theme in my local environment. So I want my theme to build to absolute/path/to/wp/wp-config/themes/MY-THEME/
I tried editing the buildinfo.properties file to change the publish path to ${HOME} but all that did was create a literal '${HOME}' folder in my project directory.
Any ideas on how to define an absolute pa开发者_如何学Goth for ant?
It looks like you're trying to use the directory specified in your environment variable ${HOME}
. Ant doesn't directly mirror this in its properties. You might access it in two ways. First, the directory should be available in the system property user.home
. For example:
<echo message="${user.home}" />
Alternatively, you can read from the environment using a property task to set a prefix for access. Example use:
<property environment="env" />
<echo message="${env.HOME}" />
精彩评论