public ReleaseNotes GetReleaseNotes( string earlierBuild, string laterBuild) { var servers = serverConfigurationQuery.Execute(); var serverUri = new Uri(servers["Server.TeamFoundation"]); var projectName = servers["Server.ProjectName"]; var earlierBuildDetail = buildQuery.Execute(serverUri, projectName, string.IsNullOrWhiteSpace(earlierBuild) ? laterBuild : earlierBuild); var laterBuildDetail = buildQuery.Execute(serverUri, projectName, laterBuild); if (earlierBuildDetail == null || laterBuildDetail == null) { return(new ReleaseNotes()); } var workItems = buildWorkItemQuery.Execute(earlierBuildDetail, laterBuildDetail, serverUri, projectName).ToArray(); var releaseNotes = new ReleaseNotes { Items = workItems, PreviousRelease = earlierBuild, CurrentRelease = laterBuild, States = GetStates(), Title = "Release Notes", CsvItems = workItemFormatter.Format(workItems) }; return(releaseNotes); }
public ReleaseInformation GetReleaseInfo(string productName, string os, string architecture, string version) { try { var path = GenerateArtifactPath(productName, os, architecture, version); if (Directory.Exists(path)) { var dir = new DirectoryInfo(path); var files = dir.GetFiles(); var deploymentMetaInfo = GetDeploymentMetaInfo(files); var releaseNotesFileName = Path.Combine(path, deploymentMetaInfo.ReleaseNotesFileName); return(new ReleaseInformation { ReleaseNotes = ReleaseNotes.FromJsonFile(releaseNotesFileName), ReleaseDate = deploymentMetaInfo.ReleaseDate }); } //The artifact directory (thus the specified artifact) does not exist. return(null); } catch (Exception e) { logger.LogCritical(e.Message); throw; } }
protected override void Execute(NativeActivityContext context) { var pModel = new PackageModel(); pModel.Id = PackageId.Get(context); pModel.Description = Description.Get(context); pModel.Version = Models.PackageModel.CreateFullVersionFromMajorMinor(MajorVersion.Get(context), MinorVersion.Get(context)); pModel.Authors = Authors.Get(context); pModel.Owners = Owners.Get(context); pModel.LicenseUrl = LicenseUrl.Get(context); pModel.ProjectUrl = ProjectUrl.Get(context); pModel.IconUrl = IconUrl.Get(context); pModel.RequireLicenseAcceptance = RequireLicenseAcceptance.Get(context); pModel.ReleaseNotes = ReleaseNotes.Get(context); pModel.Copyright = Copyright.Get(context); pModel.Tags = Tags.Get(context); pModel.DirectorySet = DirectorySet.Get(context); pModel.ModelsAssemblyGuid = ModelsAssemblyGuid.Get(context) ?? Guid.NewGuid().ToString(); pModel.ActivitiesAssemblyGuid = ActivitiesAssemblyGuid.Get(context) ?? Guid.NewGuid().ToString(); this.PackageModel.Set(context, pModel); context.Properties.Add("PackageModel", pModel); context.ScheduleActivity(this.Body); }
/// <summary> /// Parse a release notes /// </summary> /// <param name="rawReleaseNotes">Raw release notes</param> /// <param name="settings">Settings used for converting</param> /// <returns>A parsed release notes</returns> public static ReleaseNotes Parse(string rawReleaseNotes, SemanticReleaseNotesConverterSettings settings = null) { if (string.IsNullOrWhiteSpace(rawReleaseNotes)) { throw new ArgumentNullException("rawReleaseNotes"); } var releaseNotes = new ReleaseNotes(); var rawLines = rawReleaseNotes.Replace("\r", string.Empty).Split('\n'); for (int i = 0; i < rawLines.Length; i++) { var rawLine = rawLines[i]; var nextInput = string.Empty; if (i + 1 < rawLines.Length) { nextInput = rawLines[i + 1]; } // Process the line for (int j = 0; j < ParserParts.Count; j++) { if (ParserParts[j].Parse(rawLine, releaseNotes, nextInput)) { break; } } } return(releaseNotes); }
//************************************************************************************ private void buttonUpdate_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; buttonUpdate.Text = "Updating ..."; buttonUpdate.Enabled = false; UpdateProgress.Minimum = 0; UpdateProgress.Maximum = 100; UpdateProgress.Step = 1; UpdateProgress.Visible = true; ReleaseNotes.Select(0, 0); string path = Environment.CurrentDirectory; using (WebClient client = new WebClient()) { string URL = $"https://github.com/maxsnts/{Main.UpdateRepo}/releases/download/v{NewVersion}/{Main.UpdateRepo}.v{NewVersion}.zip"; try { client.DownloadFileCompleted += Client_DownloadFileCompleted; client.DownloadProgressChanged += Client_DownloadProgressChanged; client.DownloadFileAsync(new Uri(URL), Path.Combine(path, $"{Main.UpdateRepo}.zip")); } catch { labelVersion.Text = "Unable to check for updates, update manually"; linkLatest.Text = URL; linkLatest.Visible = true; buttonUpdate.Enabled = false; } } }
public ActionResult Index(string currentRelease, string previousRelease) { ReleaseNotes model; try { var parameters = new Dictionary <string, string> { { "earlierBuild", previousRelease }, { "laterBuild", currentRelease } }; model = _restService.GetModel <ReleaseNotes>(NotesResource, parameters); model.States = model.Items.Select(item => item.State).Distinct(); } catch (HttpException) { model = new ReleaseNotes { States = new string[0], CurrentRelease = currentRelease, PreviousRelease = previousRelease, Items = new WorkItem[0], Title = string.Empty }; } return(View(model)); }
public ContentResult Milestone(string id) { var milestone = id; var closedIssues = new List <GitHubIssue>(); ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; WebResponse response = GetResponse("https://api.github.com/repos/DevExpress/AjaxControlToolkit/issues?state=closed"); while (HasNextPage(response)) { closedIssues.AddRange(GetIssuesPart(response)); response = GetResponse(GetNextPageUrl(response)); } closedIssues.AddRange(GetIssuesPart(response)); var invalidIssues = ValidateLabeledIssuesWithoutMilestone(closedIssues); var validIssues = GetMilestoneIssues(closedIssues, milestone); var docRenderer = new GitHubDocRenderer(); var releaseNotes = new ReleaseNotes(docRenderer); var markup = releaseNotes.BuildReleaseNotes(validIssues.OrderBy(issue => issue.Number), invalidIssues); Debug.WriteLine("Issues count: " + releaseNotes.GetIssueCount()); return(Content(markup)); }
private void WriteNotes(ReleaseNotes notes, TextWriter writer) { foreach (var workItem in notes.Items) { writer.Write("{0}, {1}", workItem.Id, workItem.State); } }
public async Task <IActionResult> Index(ReleaseNotesViewModel model) { if (!ModelState.IsValid) { return(View("Index", model)); } string githubToken = model.PatToken; string owner = model.RepositoryOwner; string repo = model.RepositoryName; string from = model.From; string to = model.To; string breaking = model.BreakingLabel ?? "breaking"; var githubCreds = new Credentials(githubToken); var githubClient = new GitHubClient(new ProductHeaderValue("GithubReleaseNotesGenerator")) { Credentials = githubCreds }; var releaseNotes = new ReleaseNotes(githubClient, logger, breaking); model.RawNotes = await releaseNotes.GetReleaseNotesAsync(owner, repo, from, to, 10).ConfigureAwait(false); model.FormattedNotes = new HtmlString(Markdown.ToHtml(model.RawNotes)); return(View("Index", model)); }
public void Setup() { WebDriver.CreateDriver(); site = new SitePage(); menu = new Menu(); snowGlobe = new SnowGlobe(); releaseNotes = new ReleaseNotes(); }
private string GetDescriptionReleaseNotes() { return(string.IsNullOrWhiteSpace(ReleaseNotes) ? null : "_Release Notes_\n\n" + "```\n" + $"{ReleaseNotes.Trim('`')}\n" + "```"); }
/// <summary> /// Format a release notes /// </summary> /// <param name="writer">TextWriter which will be used to writes the formatted release notes</param> /// <param name="releaseNotes">Release notes to format</param> /// <param name="settings">Settings used for formatting</param> public static void Format(TextWriter writer, ReleaseNotes releaseNotes, SemanticReleaseNotesConverterSettings settings = null) { if (writer == null) { throw new ArgumentNullException("writer"); } writer.Write(Format(releaseNotes, settings)); }
public Manifest(Dependencies[] Dependencies, string Content_type, string Title, string Manufacturer, string Creator, string Package_version, string Minimum_game_version, ReleaseNotes Release_notes) { dependencies = Dependencies; content_type = Content_type; title = Title; manufacturer = Manufacturer; creator = Creator; package_version = Package_version; minimum_game_version = Minimum_game_version; release_notes = Release_notes; }
public bool Parse(string input, ReleaseNotes releaseNotes, string nextInput) { foreach (var metadataDefinition in MetadataDefinitions) { var match = metadataDefinition.Regex.Match(input); if (match.Success) { releaseNotes.Metadata.Add(new Metadata { Name = metadataDefinition.Name, Value = metadataDefinition.GetValue(match) }); return(true); } } return(false); }
private static List <Category> GetCategories(ReleaseNotes releaseNotes, SemanticReleaseNotesConverterSettings settings) { var categories = new Dictionary <string, List <Item> >(); ProcessCategories(categories, releaseNotes.Items, settings); foreach (var section in releaseNotes.Sections) { ProcessCategories(categories, section.Items, settings); } return(categories.Select(x => new Category { Name = x.Key, Items = x.Value }).ToList()); }
/// <summary>Fills the release notes.</summary> internal void FillReleaseNotes() { ReleaseNotes.Clear(); var releaseNotesXmlContent = Resources.ReleaseNotes; var xmlDocument = new XmlDocument(); xmlDocument.LoadXml(releaseNotesXmlContent); foreach (XmlElement noteNode in xmlDocument.DocumentElement.GetElementsByTagName("Note")) { var note = new ReleaseNote { Version = noteNode.GetAttribute("Version"), Description = CleanWhiteSpace(noteNode.FirstChild.InnerText) }; ReleaseNotes.Add(note); } }
public bool Parse(string input, ReleaseNotes releaseNotes, string nextInput) { input = input.Trim(); if (string.IsNullOrEmpty(input) && !string.IsNullOrEmpty(nextInput) && SummaryRegex.IsMatch(nextInput)) { input = Environment.NewLine + Environment.NewLine; } if (releaseNotes.Sections.Count > 0) { var lastSection = releaseNotes.Sections.Last(); lastSection.Summary = (lastSection.Summary ?? string.Empty) + input; } else { releaseNotes.Summary = (releaseNotes.Summary ?? string.Empty) + input; } return(true); }
/// <inheritdoc/> public FormattedReleaseNotes Format(string?header, ReleaseNotes releaseNotes) { var builder = new StringBuilder(); var headingLevel = _headingLevel; if (!string.IsNullOrEmpty(header)) { builder .AppendLF($"{new string('#', headingLevel)} {header}") .AppendLF(); headingLevel++; } headingLevel = Math.Max(headingLevel, 2); foreach (var label in releaseNotes.Labels) { builder .AppendLF($"{new string('#', headingLevel)} {label.DisplayName}") .AppendLF(); foreach (var issue in releaseNotes.IssuesByLabel[label.Name]) { builder .Append("- ") .Append($"[#{issue.Number}]({issue.Url}) {issue.Title}"); if (issue.Contributor != null) { builder .AppendLF($" ([@{issue.Contributor.Login}]({issue.Contributor.Url}))"); } else { builder.AppendLF(); } } } return(FormattedReleaseNotes.FromString(builder.AppendLF().ToString())); }
/// <summary> ///Format a release notes /// </summary> /// <param name="releaseNotes">Release notes to format</param> /// <param name="settings">Settings used for formatting</param> /// <returns>Formatted release notes</returns> public static string Format(ReleaseNotes releaseNotes, SemanticReleaseNotesConverterSettings settings = null) { if (releaseNotes == null) { throw new ArgumentNullException("releaseNotes"); } if (settings == null) { settings = SemanticReleaseNotesConverterSettings.Default; } // template selection string template = settings.LiquidTemplate ?? GetLiquidTemplate(settings); // liquid rendering var liquidTemplate = Template.Parse(template); // process categories List <Category> processedCategories = GetCategories(releaseNotes, settings); var itemsWithoutCategory = new List <Item>(releaseNotes.Items.Where(i => !i.Categories.Any())); releaseNotes.Sections.ForEach(s => itemsWithoutCategory.AddRange(s.Items.Where(i => !i.Categories.Any()))); string result = liquidTemplate.Render(Hash.FromAnonymousObject(new { release_notes = releaseNotes, lcb = "{", rcb = "}", categories = processedCategories, items_without_categories = itemsWithoutCategory })).Trim(); if (settings.OutputFormat == OutputFormat.Markdown) { return(result); } // convert to HTML var head = string.Empty; if (settings.IncludeStyle) { head = string.Format(HtmlHead, string.IsNullOrEmpty(settings.CustomStyle) ? GetEmbeddedResource("DefaultStyle.css") : settings.CustomStyle, Environment.NewLine); } return(string.Format(HtmlEnvelope, head, CommonMarkConverter.Convert(result, DefaultCommonMarkSettings).Trim(), Environment.NewLine)); }
public async Task <bool> CheckForUpdatesAsync() { System.Diagnostics.Debug.WriteLine("Checking for updates"); try { ReleaseNotes.Clear(); BetaNotes.Clear(); await Task.Run(Beta_GetJSON); await Task.Run(Release_GetJSON); CompareUpdate(); return(true); } catch (Exception err) { System.Diagnostics.Debug.WriteLine("Check for updates failed\nError:" + err.Message); return(false); } }
protected override PackageModel Execute(CodeActivityContext context) { var pModel = new PackageModel(); pModel.Id = PackageId.Get(context); pModel.Description = Description.Get(context); pModel.Version = Version.Get(context); pModel.Authors = Authors.Get(context); pModel.Owners = Owners.Get(context); pModel.LicenseUrl = LicenseUrl.Get(context); pModel.ProjectUrl = ProjectUrl.Get(context); pModel.IconUrl = IconUrl.Get(context); pModel.RequireLicenseAcceptance = RequireLicenseAcceptance.Get(context); pModel.ReleaseNotes = ReleaseNotes.Get(context); pModel.Copyright = Copyright.Get(context); pModel.Tags = Tags.Get(context); pModel.DirectorySet = DirectorySet.Get(context); pModel.ModelsAssemblyGuid = ModelsAssemblyGuid.Get(context); pModel.ActivitiesAssemblyGuid = ActivitiesAssemblyGuid.Get(context); return(pModel); }
public bool Parse(string input, ReleaseNotes releaseNotes, string nextInput) { var match = SectionRegex.Match(input); if (match.Success) { var section = new Section { Name = match.Groups[1].Value }; var link = LinkParser.GetLink(input); if (!string.IsNullOrEmpty(link.Item1) && link.Item1.Equals("icon", StringComparison.OrdinalIgnoreCase)) { section.Icon = link.Item2; } releaseNotes.Sections.Add(section); return(true); } return(false); }
/// <inheritdoc/> public FormattedReleaseNotes Format(string? header, ReleaseNotes releaseNotes) { var builder = new StringBuilder(); if (!string.IsNullOrEmpty(header)) { builder .AppendLF(header!) .AppendLF(); } foreach (var label in releaseNotes.Labels) { builder .AppendLF($"{label.DisplayName}:"); foreach (var issue in releaseNotes.IssuesByLabel[label.Name]) { builder .Append("- ") .Append($"#{issue.Number} {issue.Title}"); if (issue.Contributor != null) { builder .AppendLF($" (@{issue.Contributor.Login})"); } else { builder.AppendLF(); } } } return FormattedReleaseNotes.FromString(builder.ToString()); }
public static async Task Main(string[] args) { var builder = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); var configuration = builder.Build(); var username = configuration["Credentials:Username"]; var password = configuration["Credentials:Password"]; var owner = configuration["Repository:Owner"]; var repository = configuration["Repository:Name"]; if (string.IsNullOrEmpty(username)) { Console.Write("Username: "******"Password: "******"Repository Owner: "); owner = Console.ReadLine(); } if (string.IsNullOrEmpty(repository)) { Console.Write("Repository Name: "); repository = Console.ReadLine(); } var token = "Basic " + Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes($"{username}:{password}")); var gitHubClient = RestService.For <IGitHubClient>("https://api.github.com/"); var commits = new List <Commit>(); var tags = new List <Tag>(); // Get commits until results no longer returned, adding to list for (var i = 1; i < 1000; i++) { try { Console.Clear(); Console.WriteLine($"Processing {i * 100} Commits"); var pageCommits = await gitHubClient.GetCommits(token, repository, owner, repository, 100, i); if (pageCommits.Any()) { commits.AddRange(pageCommits); } else { break; } } catch (ApiException ex) { switch (ex.StatusCode) { case HttpStatusCode.Unauthorized: Console.WriteLine("Invalid Git credentials."); break; case HttpStatusCode.NotFound: Console.WriteLine("Unable to load repository, check owner and name are correct."); break; default: Console.WriteLine($"Unexpected error contacting Git. {ex.Content}"); break; } Console.WriteLine("Press Enter to restart the application and try again."); Console.ReadLine(); return; } } commits.Reverse(); // Get tags until results no longer returned, adding to list for (var i = 1; i < 1000; i++) { var pageTags = await gitHubClient.GetTags(token, repository, owner, repository, 100, i); if (pageTags.Any()) { tags.AddRange(pageTags); } else { break; } } if (!tags.Any()) { Console.WriteLine("You have no tags in your repository. Please ensure that you tag your releases."); Console.WriteLine("Press Enter to close the application."); Console.ReadLine(); return; } var releaseNotes = new ReleaseNotes(); var releaseNote = new ReleaseNote(); foreach (var commit in commits) { var tag = tags.SingleOrDefault(t => t.Sha == commit.Sha); if (tag != null) { releaseNote = new ReleaseNote { Version = tag.Name, ReleaseDate = commit.CommitMessage.Author.Date.ToShortDateString(), Notes = new List <string> { commit.Message } }; releaseNotes.Add(releaseNote); } else { releaseNote.Notes.Add(commit.Message); } } releaseNotes.Reverse(); // JSON Output var json = JsonConvert.SerializeObject(releaseNotes); File.WriteAllText("releaseNotes.json", json); Console.WriteLine(json); Console.WriteLine(); Console.WriteLine("Done. Press Enter to exit."); Console.ReadLine(); }
private bool isNewVersionAvailable(bool silentCheck) { WebClient wc = new WebClient(); string xmlFile = Path.GetTempPath() + "gumpad-relnotes.xml"; GumTrace.log(TraceEventType.Information, "rel notes file=" + xmlFile); ReleaseNotes relNotes = new ReleaseNotes(); try { wc.DownloadFile(relNotesURL, xmlFile); wc.Dispose(); StreamReader relNotesStream = new StreamReader(xmlFile); XmlSerializer serializer = new XmlSerializer(typeof(ReleaseNotes)); relNotes = (ReleaseNotes)serializer.Deserialize(relNotesStream); relNotesStream.Close(); } catch (Exception ex) { if (!silentCheck) { MessageBox.Show("Check for updates failed - " + ex.Message); } return false; } Cursor = System.Windows.Forms.Cursors.Default; GumTrace.log(TraceEventType.Information, "latest rev=" + relNotes.m_latest_version); Version currentVer = System.Reflection.Assembly.GetExecutingAssembly(). GetName().Version; StringBuilder messagebuff = new StringBuilder(); FormCheckForUpdates f = new FormCheckForUpdates(); if ((relNotes.m_latest_version != null) && (currentVer.ToString().CompareTo(relNotes.m_latest_version) < 0)) { messagebuff.Append("\n\nA new version of GumPad is available at http://gumpad.org/"); messagebuff.Append("\n\n"); messagebuff.Append("You are currently running version : "); messagebuff.Append(currentVer.ToString()); messagebuff.Append("\n"); messagebuff.Append("The latest version available at http://gumpad.org is : "); messagebuff.Append(relNotes.m_latest_version); messagebuff.Append("\n\n"); messagebuff.Append(getRelNotesText(relNotes, currentVer.ToString())); //messagebuff.Append("\nClick on the Download and Install button below to update to the latest version"); f.setMessageText(messagebuff.ToString()); f.setInstallerURLandName(filesURL, relNotes.m_latest_installer); f.ShowDialog(); f.Dispose(); return true; } else { if (!silentCheck) { messagebuff.Append("\n\nThe version you are currently using is : "); messagebuff.Append(currentVer.ToString()); messagebuff.Append("\n\n"); messagebuff.Append("\n\nYou are already running the latest version of GumPad\n\n"); messagebuff.Append(getRelNotesText(relNotes, currentVer.ToString())); f.setMessageText(messagebuff.ToString()); f.ShowDialog(); f.Dispose(); } return false; } }
public void DeserializeReleaseNotes() { var parsedReleaseNotes = ReleaseNotes.FromJsonFile(Path.Combine(ProjectDirectory, "TestData", "testReleaseNotes.json")); parsedReleaseNotes.Should().BeEquivalentTo(ExpectedReleaseNotes); }
public JsonSerializeTest() { ProjectDirectory = TestUtils.GetProjectDirectory(); ExpectedReleaseNotes = new ReleaseNotes { Changes = new Dictionary <CultureInfo, List <ChangeSet> > { { new CultureInfo("de"), new List <ChangeSet> { new ChangeSet { Platforms = new List <string> { "windows/any", "linux/rpi" }, Added = new List <string> { "added de 1", "added de 2" }, Fixed = new List <string> { "fix de 1", "fix de 2" }, Breaking = new List <string> { "breaking de 1", "breaking de 2" }, Deprecated = new List <string> { "deprecated de 1", "deprecated de 2" } } } }, { new CultureInfo("en"), new List <ChangeSet> { new ChangeSet { Platforms = new List <string> { "windows/any", "linux/rpi" }, Added = new List <string> { "added en 1", "added en 2" }, Fixed = new List <string> { "fix en 1", "fix en 2" }, Breaking = new List <string> { "breaking en 1", "breaking en 2" }, Deprecated = new List <string> { "deprecated en 1", "deprecated en 2" } }, new ChangeSet { Platforms = null, Added = new List <string> { "added en 3" }, Fixed = new List <string> { "fix en 3" }, Breaking = new List <string> { "breaking en 3" }, Deprecated = new List <string> { "deprecated en 3" } } } } } }; ExpectedMeta = new DeploymentMetaInfo { ReleaseNotesFileName = "releaseNotes.json", ArtifactFileName = "artifact.zip", ReleaseDate = new DateTime(2020, 02, 01) }; }
// Module defining this command // Optional custom code for this activity /// <summary> /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. /// </summary> /// <param name="context">The NativeActivityContext for the currently running activity.</param> /// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns> /// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks> protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context) { System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create(); System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName); // Initialize the arguments if (Path.Expression != null) { targetCommand.AddParameter("Path", Path.Get(context)); } if (NestedModules.Expression != null) { targetCommand.AddParameter("NestedModules", NestedModules.Get(context)); } if (Guid.Expression != null) { targetCommand.AddParameter("Guid", Guid.Get(context)); } if (Author.Expression != null) { targetCommand.AddParameter("Author", Author.Get(context)); } if (CompanyName.Expression != null) { targetCommand.AddParameter("CompanyName", CompanyName.Get(context)); } if (Copyright.Expression != null) { targetCommand.AddParameter("Copyright", Copyright.Get(context)); } if (RootModule.Expression != null) { targetCommand.AddParameter("RootModule", RootModule.Get(context)); } if (ModuleVersion.Expression != null) { targetCommand.AddParameter("ModuleVersion", ModuleVersion.Get(context)); } if (Description.Expression != null) { targetCommand.AddParameter("Description", Description.Get(context)); } if (ProcessorArchitecture.Expression != null) { targetCommand.AddParameter("ProcessorArchitecture", ProcessorArchitecture.Get(context)); } if (PowerShellVersion.Expression != null) { targetCommand.AddParameter("PowerShellVersion", PowerShellVersion.Get(context)); } if (ClrVersion.Expression != null) { targetCommand.AddParameter("ClrVersion", ClrVersion.Get(context)); } if (DotNetFrameworkVersion.Expression != null) { targetCommand.AddParameter("DotNetFrameworkVersion", DotNetFrameworkVersion.Get(context)); } if (PowerShellHostName.Expression != null) { targetCommand.AddParameter("PowerShellHostName", PowerShellHostName.Get(context)); } if (PowerShellHostVersion.Expression != null) { targetCommand.AddParameter("PowerShellHostVersion", PowerShellHostVersion.Get(context)); } if (RequiredModules.Expression != null) { targetCommand.AddParameter("RequiredModules", RequiredModules.Get(context)); } if (TypesToProcess.Expression != null) { targetCommand.AddParameter("TypesToProcess", TypesToProcess.Get(context)); } if (FormatsToProcess.Expression != null) { targetCommand.AddParameter("FormatsToProcess", FormatsToProcess.Get(context)); } if (ScriptsToProcess.Expression != null) { targetCommand.AddParameter("ScriptsToProcess", ScriptsToProcess.Get(context)); } if (RequiredAssemblies.Expression != null) { targetCommand.AddParameter("RequiredAssemblies", RequiredAssemblies.Get(context)); } if (FileList.Expression != null) { targetCommand.AddParameter("FileList", FileList.Get(context)); } if (ModuleList.Expression != null) { targetCommand.AddParameter("ModuleList", ModuleList.Get(context)); } if (FunctionsToExport.Expression != null) { targetCommand.AddParameter("FunctionsToExport", FunctionsToExport.Get(context)); } if (AliasesToExport.Expression != null) { targetCommand.AddParameter("AliasesToExport", AliasesToExport.Get(context)); } if (VariablesToExport.Expression != null) { targetCommand.AddParameter("VariablesToExport", VariablesToExport.Get(context)); } if (CmdletsToExport.Expression != null) { targetCommand.AddParameter("CmdletsToExport", CmdletsToExport.Get(context)); } if (DscResourcesToExport.Expression != null) { targetCommand.AddParameter("DscResourcesToExport", DscResourcesToExport.Get(context)); } if (PrivateData.Expression != null) { targetCommand.AddParameter("PrivateData", PrivateData.Get(context)); } if (Tags.Expression != null) { targetCommand.AddParameter("Tags", Tags.Get(context)); } if (ProjectUri.Expression != null) { targetCommand.AddParameter("ProjectUri", ProjectUri.Get(context)); } if (LicenseUri.Expression != null) { targetCommand.AddParameter("LicenseUri", LicenseUri.Get(context)); } if (IconUri.Expression != null) { targetCommand.AddParameter("IconUri", IconUri.Get(context)); } if (ReleaseNotes.Expression != null) { targetCommand.AddParameter("ReleaseNotes", ReleaseNotes.Get(context)); } if (HelpInfoUri.Expression != null) { targetCommand.AddParameter("HelpInfoUri", HelpInfoUri.Get(context)); } if (PassThru.Expression != null) { targetCommand.AddParameter("PassThru", PassThru.Get(context)); } if (DefaultCommandPrefix.Expression != null) { targetCommand.AddParameter("DefaultCommandPrefix", DefaultCommandPrefix.Get(context)); } return(new ActivityImplementationContext() { PowerShellInstance = invoker }); }
/// <inheritdoc/> protected override void BeforeDownload() { base.BeforeDownload(); ReleaseNotes.Show(); }
public bool Parse(string input, ReleaseNotes releaseNotes, string nextInput) { var match = PriorityRegex.Match(input); if (match.Success) { var item = new Item(); // Priority int priority; if (!string.IsNullOrEmpty(match.Groups[1].Value) && Int32.TryParse(match.Groups[1].Value, out priority)) { item.Priority = priority; } input = PriorityRegex.Replace(input, string.Empty); // link var link = LinkParser.GetLink(input); if (!string.IsNullOrEmpty(link.Item1)) { item.TaskId = link.Item1; item.TaskLink = link.Item2; input = LinkParser.LinkRegex.Replace(input, string.Empty).Trim(); } // category var categories = CategoryRegex.Matches(input); foreach (Match category in categories) { if (category.Success && !string.IsNullOrEmpty(category.Groups[1].Value)) { var categoryName = category.Groups[1].Value.ToLowerInvariant().Titleize(); if (!item.Categories.Contains(categoryName)) { item.Categories.Add(categoryName); } var replacement = category.Groups[1].Value; if (input.EndsWith(category.Groups[1].Value)) { replacement = string.Empty; } input = input.Replace(category.Groups[0].Value, replacement); } } // summary item.Summary = input.Trim(); if (releaseNotes.Sections.Count == 0) { releaseNotes.Items.Add(item); } else { releaseNotes.Sections.Last().Items.Add(item); } return(true); } return(false); }
private string getRelNotesText(ReleaseNotes relNotes, string currentVer) { StringBuilder messagebuff = new StringBuilder(); //Array.Sort(relNotes.notes); // reverse sort rel notes by version foreach (RelNote note in relNotes.notes) { if ((note.m_version != null) && (currentVer.CompareTo(note.m_version) <= 0)) { messagebuff.Append("Release Notes for version : "); messagebuff.Append(note.m_version); messagebuff.Append("\nNew Features :\n"); foreach (string feature in note.m_features) { messagebuff.Append(feature); messagebuff.Append("\n"); } messagebuff.Append("\nFixes :\n"); foreach (string fix in note.m_fixes) { messagebuff.Append(fix); messagebuff.Append("\n"); } messagebuff.Append("\nKnown Issues :\n"); foreach (string issue in note.m_known_issues) { messagebuff.Append(issue); messagebuff.Append("\n"); } } } return messagebuff.ToString(); }
private void radButton14_Click(object sender, EventArgs e) { ReleaseNotes frm = new ReleaseNotes(); frm.ShowDialog(); }