static void Main(string[] args) { if (args.Length < 2) { WriteLine(@"Syntax 1: WAWSDeploy.exe c:\SomeFolder MySite.PublishSettings [/p password]"); WriteLine(@"Syntax 2: WAWSDeploy.exe c:\SomeFile.zip MySite.PublishSettings [/p password]"); return; } // parse the command line args var command = Args.Configuration.Configure<DeploymentArgs>().CreateAndBind(args); try { var webDeployHelper = new WebDeployHelper(); WriteLine("Starting deployment..."); DeploymentChangeSummary changeSummary = webDeployHelper.DeployContentToOneSite(command.Folder, command.PublishSettingsFile, command.Password); WriteLine("BytesCopied: {0}", changeSummary.BytesCopied); WriteLine("Added: {0}", changeSummary.ObjectsAdded); WriteLine("Updated: {0}", changeSummary.ObjectsUpdated); WriteLine("Deleted: {0}", changeSummary.ObjectsDeleted); WriteLine("Errors: {0}", changeSummary.Errors); WriteLine("Warnings: {0}", changeSummary.Warnings); WriteLine("Total changes: {0}", changeSummary.TotalChanges); } catch (Exception e) { WriteLine("Deployment failed: {0}", e.Message); } }
static void Main(string[] args) { if (args.Length < 2) { WriteLine(@"Syntax 1: WAWSDeploy.exe c:\SomeFolder MySite.PublishSettings [/p password]"); WriteLine(@"Syntax 2: WAWSDeploy.exe c:\SomeFile.zip MySite.PublishSettings [/p password]"); return; } // parse the command line args var command = Args.Configuration.Configure <DeploymentArgs>().CreateAndBind(args); try { var webDeployHelper = new WebDeployHelper(); WriteLine("Starting deployment..."); DeploymentChangeSummary changeSummary = webDeployHelper.DeployContentToOneSite(command.Folder, command.PublishSettingsFile, command.Password); WriteLine("BytesCopied: {0}", changeSummary.BytesCopied); WriteLine("Added: {0}", changeSummary.ObjectsAdded); WriteLine("Updated: {0}", changeSummary.ObjectsUpdated); WriteLine("Deleted: {0}", changeSummary.ObjectsDeleted); WriteLine("Errors: {0}", changeSummary.Errors); WriteLine("Warnings: {0}", changeSummary.Warnings); WriteLine("Total changes: {0}", changeSummary.TotalChanges); } catch (Exception e) { WriteLine("Deployment failed: {0}", e.Message); } }
static void Main(string[] args) { if (args.Length < 2) { WriteLine(@"WAWSDeploy version {0}", typeof(Program).Assembly.GetName().Version); WriteLine(@"Usage: WAWSDeploy.exe c:\SomeFolder MySite.PublishSettings [flags]"); WriteLine(@"Options:"); WriteLine(@" /p /password: provide the password if it's not in the profile"); WriteLine(@" /d /DeleteExistingFiles: delete target files that don't exist at the source"); WriteLine(@" /au /AllowUntrusted: skip cert verification"); WriteLine(@" /v /Verbose: Verbose mode"); WriteLine(@" /w /WhatIf: don't actually perform the publishing"); WriteLine(@" /t /TargetPath: the virtual or physical directory to deploy to"); WriteLine(@" /c /cs: use checksum"); WriteLine(@" /o /AppOffline: automatically take an ASP.Net application offline before publishing to it."); return; } // parse the command line args var command = Args.Configuration.Configure <DeploymentArgs>().CreateAndBind(args); try { var webDeployHelper = new WebDeployHelper(); webDeployHelper.DeploymentTraceEventHandler += Trace; WriteLine("Starting deployment..."); DeploymentChangeSummary changeSummary = webDeployHelper.DeployContentToOneSite( command.Folder, command.PublishSettingsFile, command.Password, command.AllowUntrusted, !command.DeleteExistingFiles, command.TraceLevel, command.WhatIf, command.TargetPath, command.UseChecksum, command.AppOffline ); WriteLine("BytesCopied: {0}", changeSummary.BytesCopied); WriteLine("Added: {0}", changeSummary.ObjectsAdded); WriteLine("Updated: {0}", changeSummary.ObjectsUpdated); WriteLine("Deleted: {0}", changeSummary.ObjectsDeleted); WriteLine("Errors: {0}", changeSummary.Errors); WriteLine("Warnings: {0}", changeSummary.Warnings); WriteLine("Total changes: {0}", changeSummary.TotalChanges); } catch (Exception e) { WriteLine("Deployment failed: {0}", e.Message); Environment.ExitCode = 1; } }
static void Main(string[] args) { var model = Args.Configuration.Configure <DeploymentArgs>(); if (args.Length < 2) { WriteLine(@"WAWSDeploy version {0}", typeof(Program).Assembly.GetName().Version); var help = new HelpProvider(); new ConsoleHelpFormatter().WriteHelp(help.GenerateModelHelp(model), Console.Out); return; } // parse the command line args var command = model.CreateAndBind(args); try { var webDeployHelper = new WebDeployHelper(); webDeployHelper.DeploymentTraceEventHandler += Trace; WriteLine("Starting deployment..."); DeploymentChangeSummary changeSummary = webDeployHelper.DeployContentToOneSite( command.Folder, command.PublishSettingsFile, command.Password, command.AllowUntrusted, !command.DeleteExistingFiles, command.TraceLevel, command.WhatIf, command.TargetPath, command.UseChecksum, command.AppOffline, command.RetryAttempts, command.RetryInterval, command.SkipAppData, command.SkipFoldersRegexps ); WriteLine("BytesCopied: {0}", changeSummary.BytesCopied); WriteLine("Added: {0}", changeSummary.ObjectsAdded); WriteLine("Updated: {0}", changeSummary.ObjectsUpdated); WriteLine("Deleted: {0}", changeSummary.ObjectsDeleted); WriteLine("Errors: {0}", changeSummary.Errors); WriteLine("Warnings: {0}", changeSummary.Warnings); WriteLine("Total changes: {0}", changeSummary.TotalChanges); } catch (Exception e) { WriteLine("Deployment failed: {0}", e.Message); Environment.ExitCode = 1; } }
static void Main(string[] args) { if (args.Length < 2) { WriteLine(@"WAWSDeploy version {0}", typeof(Program).Assembly.GetName().Version); WriteLine(@"Usage: WAWSDeploy.exe c:\SomeFolder MySite.PublishSettings [flags]"); WriteLine(@"Options:"); WriteLine(@" /p /password: provide the password if it's not in the profile"); WriteLine(@" /d /DeleteExistingFiles: delete target files that don't exist at the source"); WriteLine(@" /au /AllowUntrusted: skip cert verification"); WriteLine(@" /v /Verbose: Verbose mode"); WriteLine(@" /w /WhatIf: don't actually perform the publishing"); WriteLine(@" /t /TargetPath: the virtual or physical directory to deploy to"); return; } // parse the command line args var command = Args.Configuration.Configure<DeploymentArgs>().CreateAndBind(args); try { var webDeployHelper = new WebDeployHelper(); webDeployHelper.DeploymentTraceEventHandler += Trace; WriteLine("Starting deployment..."); DeploymentChangeSummary changeSummary = webDeployHelper.DeployContentToOneSite( command.Folder, command.PublishSettingsFile, command.Password, command.AllowUntrusted, !command.DeleteExistingFiles, command.TraceLevel, command.WhatIf, command.TargetPath ); WriteLine("BytesCopied: {0}", changeSummary.BytesCopied); WriteLine("Added: {0}", changeSummary.ObjectsAdded); WriteLine("Updated: {0}", changeSummary.ObjectsUpdated); WriteLine("Deleted: {0}", changeSummary.ObjectsDeleted); WriteLine("Errors: {0}", changeSummary.Errors); WriteLine("Warnings: {0}", changeSummary.Warnings); WriteLine("Total changes: {0}", changeSummary.TotalChanges); } catch (Exception e) { WriteLine("Deployment failed: {0}", e.Message); Environment.ExitCode = 1; } }