.NET project build automation
I'm very green when it comes to build automation under windows and c开发者_开发知识库apability of that OS. So I'll explain what I would like to achieve bringing up Debian scenario from my previous work. So I had 2 pc, local & remote. On my local PC I launched script which:
- downloaded latest version from source control
- did some build stuff, renaming files according to build params etc
- created zipped bundle
- copied zipped bundle to remote live host
- amended application entrypoint config file on live host (PHP application) so that application is in "offline" mode
- started to unzip bundle
- when package is unzipped, script revert changes in some files and application is back in "online" mode
I guess that some of that actions will reqiure only FTP server. But what about performing unzip/rename , on linux I had remote access to command line. How is that with Windows. What tools / apps / services will I require to perform above stuff?
Thanks, Pawel
Script wise you have several choices on Windows: 1. Native batch files (.BAT) - can run everything you can run from a command line 2. Visual Basic Script (.VBS) - gives you some more freedom, people have done some really nice things with it, personally I really dislike it though.
Files can be zipped and unzipped using the "gzip" utility.
The problems start when you want some user interaction, this can be done but gets cumbersome (looks like you don't need that anyway). Or when you want to do something on a remote machine. The second problem is much more serious and personally I haven't found a build in way to run something on a remote machine without connecting to it.
Luckily, the choices for external tools are plenty. You can install Perl,Ruby, Python.. etc. interpretors on one or both machines to keep the environment familiar. You will probably want to take a look at http://www.cygwin.com/ too, in addition to scripting capabilities it can also be used to open an SSH connection from a remote machine.
精彩评论