TomGillen / GoldenHammer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Command Line Runner

TomGillen opened this issue · comments

GoldenHammer is intended to be used as a library to assist in compiling your own build pipeline. We need to provide the framework to allow the user to declare their build pipelines, and for the end user to invoke a specific pipeline via a CLI:

Examples:

Development build with local filesystem cache.

assetbuilder -pipeline=Development -conf=assets/build.json -cache=file:build/cache

Release build with shared network cache.

assetbuilder -pipeline=Release -conf=assets/build.json -cache=shared:build.company.com:8096

Arguments:

pipeline: Selects which named pipeline to use. Uses the default pipeline if none specified.
conf: The build configuration to build from. This contains a serialized BuildConfiguration object. Eventually, this can be generated at run time from a set of user-provided rules and the assets directory.
cache: The build and data cache system specifier. In the format [system]:[config].
log: Log file location.


The user needs to be able to define named pipelines and potential cache systems, and execute the entire thing without having to process the command line args themselves.

var builder = new AssetBuilder();

builder.EnableLocalCaching().AsDefault();
builder.EnableRemoteCaching("assets.company.com");

builder.Pipeline("Development", async options => {
    var pipe = new AssetPipeline(options);
    pipe.UseStandardImporters();
    pipe.UseStandardProcessors();
    pipe.UseXnbPackager();

    await pipe.Build()
});

builder.Run(args);