Elentok's Blog

About me

Automated Build & Package System

The purpose of Builder is to automate the following process of building and packaging software packages (at the moment only for C# and Python projects)

  1. Get a specific version of the software from a source control repository.
  2. Update the version in the source files:

    • In C# solutions it updates the AssemblyInfo.cs file
    • In Python projects it adds the version to the top of each file (after the shebang line and updates the __version__ variable in each file.
  3. Create a source package (zip file with only the source files)
  4. Build the product (for C# solutions uses the msbuild.exe).
  5. Create a binary package (zip file with only the files required to run the application).

Builder is written in Python, to use it you must first create a settings file (a ".builder" file which is basically an INI file).

This is the ".builder" file format for C# projects:

[Builder]
Name = name-of-the-project (this will also be the name of the archive)
Type = Cs
OutputDirectory = D:\Releases\MyProject

[CsBuilder]
; (the files from {StartupProject}/bin/Release will be copied to the 
; binary package)
StartupProject = name-of-startup-project
Solution = solution-file.sln

[SVN]
; (the path to the project in the repository)
SvnRoot = file:///S:/Subversion/MyProject

And this is the ".builder" file format for Python projects:

[Builder]
Name = Builder
Type = Python
OutputDirectory = D:\Releases\Builder

[PyBuilder]
Message = This message will be added to all .py files.

[SVN]
SvnRoot = file:///S:/Subversion/Builder

To associate the .builder extension with builder you can use the RegisterBuilderFiles.reg file in the source archive (just change the path to where you put Builder).

Download version 1.0.4 here

Next:Todo 0.1.2