Visual SVN、hudson 构建触发器

发布于 09-06 07:06 字数 1421 浏览 8 评论 0原文

我在 Windows Server 2008 上安装了 VisualSVN 服务器。我想使用提交后挂钩命令行来调用我在 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,因为它说复制并粘贴到提交后挂钩中,我认为这意味着它不需要更改。我不断收到这些错误:

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

I have visualSVN server installed on windows server 2008. I want to use the post commit hook command line to call this code that I got on the Hudson web site:

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

I replace server with my real server name but the script doesn't work. I have no idea where it is getting the $1 and $2 from since it says copy and paste into the post commit hook I figured that means it doesn't need to be changed. I keep getting these errors:

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.  

Question

Does anyone know why I keep getting these errors and how I can fix it?

Here is the link to the hudson documentation:
http://wiki.hudson-ci.org/display/HUDSON/Subversion+Plugin

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

余生再见2024-09-13 07:06:47

您的问题(和错误消息)表明该脚本正在 Windows 上执行,但列出的脚本是 Unix shell 脚本。尝试相应的 Windows 脚本套件

Your question (and the error messages) indicate that this script is executing on Windows, but the script listed is a Unix shell script. Try the corresponding suite of scripts for Windows.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文