使用nant自动发布我的flex网站?

时间:2022-03-14 10:14:14

I am using Flex and I am tired of having to manually place files in the right folders whenever I want to do a publish. I'd like to do a publish when the build suceeds.

我正在使用Flex,我厌倦了每当我想要发布时,必须手动将文件放在正确的文件夹中。我希望在构建成功时进行发布。

Is there a quick way, using Nant (not my current build tool of choice), to automate this? I have a virtual directory on my PC which is my hosting directory.

有没有一种快速的方法,使用Nant(不是我当前的构建工具),自动化这个?我的PC上有一个虚拟目录,这是我的托管目录。

Thanks

1 个解决方案

#1


NAnt has a copy task that will let you do this. Just specify the files and folders you want to copy and the target folder.

NAnt有一个复制任务,可以让你这样做。只需指定要复制的文件和文件夹以及目标文件夹即可。

If you also build your Flex app with NAnt, you could automatically do the build and the file/folder copy.

如果您还使用NAnt构建Flex应用程序,则可以自动执行构建和文件/文件夹副本。

An example:

<copy todir="${build.dir}">
  <fileset basedir="bin">
    <include name="*.dll" />
  </fileset>
</copy>

http://nant.sourceforge.net/release/latest/help/tasks/copy.html

#1


NAnt has a copy task that will let you do this. Just specify the files and folders you want to copy and the target folder.

NAnt有一个复制任务,可以让你这样做。只需指定要复制的文件和文件夹以及目标文件夹即可。

If you also build your Flex app with NAnt, you could automatically do the build and the file/folder copy.

如果您还使用NAnt构建Flex应用程序,则可以自动执行构建和文件/文件夹副本。

An example:

<copy todir="${build.dir}">
  <fileset basedir="bin">
    <include name="*.dll" />
  </fileset>
</copy>

http://nant.sourceforge.net/release/latest/help/tasks/copy.html