.NET 构建的 psake 与 rake
我正在研究与 ASP.NET MVC 2 应用程序一起使用的构建工具。我喜欢使用脚本语言而不是 XML 的想法,并且将我的选择范围缩小到 psake 或 rake。我对 Ruby 或 PowerShell 没有太多经验,但我愿意学习。如果这是我的最佳选择,我不介意在我的构建服务器上安装 Ruby。
我的构建没有太复杂或不寻常的地方。它需要从 Mercurial 存储库中获取源代码、构建 Visual Studio 10 解决方案、对配置文件进行一些转换、基于数据库 (Data Dude) 项目构建/运行 SQL 脚本、复制 VS 的 Web 发布,并且可能做一些其他基本的文件同步。
有人有 rake 和 psake 的经验可以比较它们吗?一个在功能方面是否比另一个更有优势,还是仅仅取决于脚本语言的偏好?
提前致谢。
编辑: 我还没有合适的 CI 解决方案,但我倾向于使用 TeamCity。我想我会提到它,以防一种构建工具比另一种更好地发挥作用。
I'm investigating build tools for use with an ASP.NET MVC 2 application. I like the idea of using a scripting language rather than XML, and have narrowed my choices down to psake or rake. I don't have much experience with Ruby or PowerShell, but am willing to learn either. I don't mind installing Ruby on my build server if that's my best option.
Nothing too complicated or unusual about my build. It'll need to pull my source from a Mercurial repo, build a Visual Studio 10 solution, do some transformations of config files, build/run a SQL script based on a Database (Data Dude) Project, replicate VS's Web Publish, and probably do some other basic file syncing.
Anyone have experience with both rake and psake that could compare them? Does one have an edge over the other in terms of features, or does it just come down to scripting language preference?
Thanks in advance.
EDIT:
I don't have a CI solution in place yet, but I'm leaning toward using TeamCity. Thought I'd mention it in case one build tool plays nicer with it than the other.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我必须同意德里克的评估。这实际上取决于您和您的团队是否觉得 Ruby 还是 Powershell 更舒服(以及您认为学习哪一个更有价值)。两者都有各自的优点和缺点。恕我直言,两者都比 XML 更好。正如 Derick 所说,我也有自己的偏见,因为我是 psake 的原作者。 :)
psake/PowerShell 的一些优点:
rake/Ruby 的一些优点:
这两种解决方案都可以帮助您构建解决方案。选择适合您团队的一种。希望有帮助。
I would have to agree with Derick's assessment. It really depends on whether you and your team feel more comfortable with Ruby or Powershell (and also which you see more value in learning). Both have their strengths and weaknesses. Either is better than XML IMHO. And as Derick said, I too have my own bias as I'm the original author of psake. :)
A few advantages of psake/PowerShell:
A few advantages of rake/Ruby:
Both solutions work to get your solution built. Choose the one that works for your team. Hope that helps.
如果您还没有这样做,请查看我的 Albacore 项目。它是一套用于构建 .NET 解决方案的 Rake 任务,将使 .NET 解决方案的 Rake 工作变得更加容易。您可以从 http://albacorebuild.net 获取所需的所有信息
- 话虽如此 - 我显然对我使用的工具有自己的偏见和偏好宁愿使用。因此,请对此持保留态度并了解我的偏好............
老实说
,我认为这不是哪个工具可以满足您的需求的问题,而是更多哪种工具适合您的技能和舒适程度的问题。 psake 和 rake+albacore 具有几乎相同的功能。他们都工作得很好。与其他工具相比,它们都使您的工作变得非常轻松。但根据他们的背景和出身,他们有不同的方法和思维方式。
您是否对全 Microsoft 平台的工具堆栈更满意?或者您是否对典型 MS 堆栈之外的工具感到满意,但仍然为在 MS 堆栈上构建软件的人们提供价值。
您是否希望使用 powershell 直接支持您的构建工具?您是否愿意拥有类似 c# 的经验,并且能够将 C# 和其他 .NET 代码合并到您的构建过程中?您是否希望能够使用 powershell 的各种插件来帮助自动化 Windows 的各个方面以进行部署?
或者您更愿意拥有一个跨平台、非常开放的系统,让您在 ruby / rake 中编写的代码获得更自然的语言体验?您对部署的 *nix 风格工具和命令、ssh 以及远程进程执行感到满意吗?
你说你不介意在构建服务器上安装 ruby,这回答了这个问题的一部分,并让你可以选择。不过,仍有很多问题需要解答。
如果您更熟悉 MS 堆栈并希望获得基于 MS 的工具的开箱即用体验,那么请使用 powershell。如果您想扩展您的视野并稍微脱离 MS 堆栈,使用易于集成和使用的工具集来体验 Ruby 世界的全部内容,那么请选择 ruby/rake/长鳍金枪鱼。
我希望这会有所帮助,尽管我没有直接回答您应该使用哪一个。不过,希望我已经为您提供了足够的信息来思考确定哪一个更适合您/您的团队。
If you haven't done so, take a look at my Albacore project. it's a suite of rake tasks for building .NET solutions and will make working with Rake much easier for .NET solutions. You can get all the info you need from http://albacorebuild.net
having said that - i obviously have my own bias and preferences for which tool i would rather use. so take this with a grain of salt and understanding my preferences...
..................
I honestly think it's less a question of which tool does what you want, and more a question of which tool fits your skill set and comfort level. both psake and rake+albacore have pretty much the same functionality. they both work very well. they both make your job very easy compared to other tools. but they have different approaches and mind sets, based on their background and where they come from.
are you more comfortable with a stack of tools that is all Microsoft platform? or are you comfortable with tools that are outside of the typical MS stack, but still provide value to people who are building software on the MS stack.
would you rather have support for your build tool right out of the box, with powershell? would you rather have a c#-like experience, with the ability to incorporate C# and other .NET code into your build process? do you want the ability to use the various plugins for powershell that help automate various aspects of windows, for deployments?
or would you rather have a cross-platform, very open system that gives you a more natural language experience with the code you write, in ruby / rake? are you comfortable with *nix style tools and commands, ssh, and remote process execution for your deployments?
you say you don't mind installing ruby on the build server, which answers part of this question and leaves you open to the options. there's a lot of questions still needing to be answered, though.
if you are more comfortable with the MS stack and want the out-of-the-box experience of an MS based tool, then go with powershell. if you want to expand your horizons and get out of the MS stack a little, with a tool set that is easy to integrate and work with, to get a taste of what the Ruby world is all about, then go with ruby/rake/albacore.
i hope that helps, even though I have not given you a direct answer on which one you should use. hopefully i've given you enough to think about to determine which one is better for you / your team, though.
我目前正在开发基于 PowerShell 的构建工具,该工具将 XML 配置与通过 PowerShell 本身使用和扩展系统的能力相结合。我想要一个简单的构建工具,可以扩展和定制它以适应大多数构建过程。以下是项目示例页面:
Crawler-Lib Build-Tools 示例
I'm currently developing PowerShell based build tools that combine XML configuration with the ability to use and extend the system with PowerShell itself. I want to have a simple build tools which can be extended and customized to fit in most build processes. Here is the project sample page:
Crawler-Lib Build-Tools Samples