0

我有一个 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 不要将我的构建脚本的任何输出传递到命令行?

4

1 回答 1

0

我在SuperUserStackOverflow上都找到了答案。

set :build_script, "ant compress -q > NUL"
于 2012-08-27T00:00:09.063 回答