Capistrano使用Ant构建脚本

时间:2012-08-26 02:34:43

标签: ant capistrano

我有一个PHP应用程序,我已经与Capistrano部署了一段时间了。我想在部署到服务器之前在本地压缩js和css并执行其他清理任务。我目前使用build_script进行Ant调用:

set :build_script, "ant compress -q"

我不确定这是否仅限于Windows,但我的部分输出如下:

executing locally: ant compress -q

{$HOME}\AppData\Local\Temp\20120826020126>/*
'/*' is not recognized as an internal or external command,
operable program or batch file.

{$HOME}\AppData\Local\Temp\20120826020126>Licensed to the Apache Software Foundation (ASF) under one or more
'Licensed' is not recognized as an internal or external command,
operable program or batch file.

{$HOME}\AppData\Local\Temp\20120826020126>contributor license agreements.  See the NOTICE file distributed with
'contributor' is not recognized as an internal or external command,
operable program or batch file.

{$HOME}\AppData\Local\Temp\20120826020126>this work for additional information regarding copyright ownership.
'this' is not recognized as an internal or external command,
operable program or batch file.

{$HOME}\AppData\Local\Temp\20120826020126>The ASF licenses this file to You under the Apache License, Version 2.0
'The' is not recognized as an internal or external command,
operable program or batch file.
you was unexpected at this time.

有没有办法抑制Ant的所有输出,或者至少让Capistrano不将我的构建脚本的任何输出传递给命令行?

1 个答案:

答案 0 :(得分:0)

我在SuperUserStackOverflow找到了答案。

set :build_script, "ant compress -q > NUL"