开发者

set absolute path in ant build.xml

开发者 https://www.devze.com 2023-02-26 07:32 出处:网络
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.

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}" />
0

精彩评论

暂无评论...
验证码 换一张
取 消