Skip to content

Instantly share code, notes, and snippets.

@tiendq
Created January 28, 2013 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiendq/4654000 to your computer and use it in GitHub Desktop.
Save tiendq/4654000 to your computer and use it in GitHub Desktop.
var cmd = "MSBuild";
var sourcePath = "C:\\Store.Web\\";
var profile = "Release";
var buildPath = "C:\\Build";
// Temporary folder must ends with slash.
var tempPath = buildPath + "\\Temp\\";
var outputPath = buildPath + "\\Output\\Store.zip";
// Log folder must exist.
var logPath = buildPath + "\\Logs\\MSBuild-Store.log";
var params = [
sourcePath + "Store.Web.csproj",
"/t:Rebuild",
"/p:Configuration=" + profile,
"/p:DeployOnBuild=true",
"/p:DeployTarget=Package",
"/p:PublishProfile=" + profile,
"/p:VisualStudioVersion=11.0",
"/p:PackageLocation=" + outputPath,
"/p:BaseIntermediateOutputPath=" + tempPath,
"/fl",
"/flp:Verbosity=normal;LogFile=" + logPath];
var spawn = require("child_process").spawn;
var app = spawn(cmd, params);
app.stdout.on("data", function (data)
{
console.log("" + data);
});
app.stderr.on("data", function (data)
{
console.log("" + data);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment