protected override void Execute(CodeActivityContext context) { #region Workflow Arguments var switchInvokePowerShell = SwitchInvokePowerShell.Get(context); var powerShellScriptPath = PowerShellScriptPath.Get(context); var nuGetExeFilePath = NuGetExeFilePath.Get(context); var nuSpecFilePath = NuSpecFilePath.Get(context); var basePath = BasePath.Get(context); var outputDirectory = OutputDirectory.Get(context); var version = Version.Get(context); var switchInvokePush = SwitchInvokePush.Get(context); var apiKey = ApiKey.Get(context); var pushDestination = PushDestination.Get(context); var additionalOptions = AdditionalOptions.Get(context); #endregion var resultMessages = SummarizePropertyValues(switchInvokePowerShell, powerShellScriptPath, nuGetExeFilePath, nuSpecFilePath, basePath, outputDirectory, version, switchInvokePush, apiKey, pushDestination, additionalOptions); for (var i = 0; i < resultMessages.Length - 1; i++) { // Write to the log context.WriteBuildMessage(resultMessages[i], BuildMessageImportance.High); } }
protected override void Execute(CodeActivityContext context) { #region Extract Workflow Argument Values // The file path of the nuget.exe - if null or empty then // assume nuget is "installed" on the build server and in the path var nuGetExeFilePath = NuGetExeFilePath.Get(context); // The path of the nuspec file var packageLocation = PackageLocation.Get(context); // The API Key for pushing var apiKey = ApiKey.Get(context); // The destination location if deployment is to be done var pushDestination = PushDestination.Get(context); #endregion // Don't assume that DI will have happened. If the value is null then create the default object.) if (NuGetProcess == null) { NuGetProcess = new NuGetProcess(); } // Call the method that will do the work var results = NuGetPublishing(nuGetExeFilePath, packageLocation, pushDestination, apiKey, context); // Send the result back to the workflow NuGetPushResult.Set(context, results); }
protected override void Execute(CodeActivityContext context) { #region Extract Workflow Argument Values // The file path of the nuget.exe - if null or empty then // assume nuget is "installed" on the build server and in the path var nuGetExeFilePath = NuGetExeFilePath.Get(context); // The path of the nuspec file var nuSpecFilePath = NuSpecFilePath.Get(context); // The folder location of the files to be packed var basePath = BasePath.Get(context); // The folder location of the files to be packed var outputDirectory = OutputDirectory.Get(context); // The destination location if deployment is to be done var versionNumber = VersionNumber.Get(context); // command line options to append (as is) to the nuget command line var additionalOptions = AdditionalOptions.Get(context); #endregion context.WriteBuildMessage(string.Format("In CallNuGetPackageCommandLine:"), BuildMessageImportance.High); context.WriteBuildMessage(string.Format("nuGetExeFilePath: {0}", nuGetExeFilePath), BuildMessageImportance.High); context.WriteBuildMessage(string.Format("basePath: {0}", basePath), BuildMessageImportance.High); context.WriteBuildMessage(string.Format("outputDirectory: {0}", outputDirectory), BuildMessageImportance.High); context.WriteBuildMessage(string.Format("versionNumber: {0}", versionNumber), BuildMessageImportance.High); context.WriteBuildMessage(string.Format("additionalOptions: {0}", additionalOptions), BuildMessageImportance.High); // Don't assume that DI will have happened. If the value is null then create the default object.);) if (NuGetProcess == null) { NuGetProcess = new NuGetProcess(); } // Call the method that will do the work var results = NuGetPackaging(nuGetExeFilePath, nuSpecFilePath, outputDirectory, basePath, versionNumber, additionalOptions, context); // Send the result back to the workflow NuGetPackagingResult.Set(context, results); }