Visual SVN,hudson构建触发器

时间:2010-06-17 01:33:00

标签: hudson visualsvn-server

我在Windows Server 2008上安装了visualSVN服务器。我想使用post commit hook命令行来调用我在Hudson网站上获得的代码:

set REPOS="$1"
set REV="$2"
set UUID=`svnlook uuid $REPOS`
/usr/bin/wget \
  --header "Content-Type:text/plain;charset=UTF-8" \
  --post-data "`svnlook changed --revision $REV $REPOS`" \
  --output-document "-" \
  http://server/hudson/subversion/${UUID}/notifyCommit?rev=$REV

我用我的真实服务器名称替换服务器,但脚本不起作用。我不知道它从哪里得到$ 1和$ 2,因为它说复制并粘贴到post commit hook我认为这意味着它不需要更改。我一直收到这些错误:

Error: post-commit hook failed (exit code 1) with output:  
Error: The system cannot find the path specified.  
Error: '--header' is not recognized as an internal or external command,  
Error: operable program or batch file.  
Error: '--post-data' is not recognized as an internal or external command,  
Error: operable program or batch file.  
Error: '--output-document' is not recognized as an internal or external command,  
Error: operable program or batch file.  
Error: 'http:' is not recognized as an internal or external command,  
Error: operable program or batch file.  

问题

有谁知道为什么我会一直收到这些错误以及如何修复它?

以下是hudson文档的链接:
http://wiki.hudson-ci.org/display/HUDSON/Subversion+Plugin

1 个答案:

答案 0 :(得分:5)

您的问题(和错误消息)表明此脚本正在Windows上执行,但列出的脚本是Unix shell脚本。试试corresponding suite of scripts for Windows