开发者

.NET project build automation

开发者 https://www.devze.com 2023-02-06 00:47 出处:网络
I\'m very green when it comes to build automation under windows and c开发者_开发知识库apability of that OS.

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:

  1. downloaded latest version from source control
  2. did some build stuff, renaming files according to build params etc
  3. created zipped bundle
  4. copied zipped bundle to remote live host
  5. amended application entrypoint config file on live host (PHP application) so that application is in "offline" mode
  6. started to unzip bundle
  7. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号