1

Iam using hudson and ant, i want to create a build structure like according to the current date, date folder has to be created and whenever the scheduled build was done , the concern war has to be placed in that date folder, so that it will be easy to pick up the war by the QA team, according to the date.

now I want to create a date folder according to the current date and to put the war in it.

4

1 回答 1

1

您可以添加到 Ant 构建文件中来执行此操作吗?如果是这样,这可能是一个合适的起点。使用 Anttstamp任务为今天的构建生成目录名称。在此处的示例中,还生成了一个构建时间戳,因此可以保持每天多次构建。

<tstamp>
<format property="build.date" pattern="yyyyMMdd" />
<format property="build.time" pattern="HHmmss" />
</tstamp>

<property name="current.build.artifacts" value="${build.artifacts}/${build.date}" />
<mkdir dir="${build.artifacts}/${build.date}" />

<copy file="${build.war}" tofile="${current.build.artifacts}/${build.war}.${build.time}" />

您还可以考虑使用buildnumber任务任务entry功能引入内部版本号。propertyfile

于 2012-04-14T12:04:50.407 回答