mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-28 15:40:56 +01:00
Even better release notes generation
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
$bf = $env:APPVEYOR_BUILD_FOLDER
|
||||
[XML]$versionXML = Get-Content "$bf/build/Version.props"
|
||||
$propsPath = "$bf/build/Version.props"
|
||||
|
||||
[XML]$versionXML = Get-Content $propsPath
|
||||
$env:TGSVersion = $versionXML.Project.PropertyGroup.TgsCoreVersion
|
||||
$env:APIVersion = $versionXML.Project.PropertyGroup.TgsApiVersion
|
||||
$env:DMVersion = $versionXML.Project.PropertyGroup.TgsDmapiVersion
|
||||
@@ -11,7 +13,7 @@ if (($env:CONFIGURATION -match "Release") -And ($env:APPVEYOR_REPO_BRANCH -match
|
||||
$env:TGSDeploy = "Do it."
|
||||
|
||||
Write-Host "Generating release notes..."
|
||||
dotnet run -p "$bf/tools/ReleaseNotes" $env:TGSVersion
|
||||
dotnet run -p "$bf/tools/ReleaseNotes" $env:TGSVersion $propsPath
|
||||
$env:TGSDraftNotes = !($?)
|
||||
$releaseNotesPath = "$bf/release_notes.md"
|
||||
Write-Host "Reading release notes from $releaseNotesPath..."
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Octokit;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -33,11 +32,11 @@ namespace ReleaseNotes
|
||||
return 2;
|
||||
}
|
||||
|
||||
var doNotCloseMilestone = args.Length >= 2 && args[1].ToUpperInvariant() == "--NO-CLOSE";
|
||||
var doNotCloseMilestone = args.Length > 1 && args[1].ToUpperInvariant() == "--NO-CLOSE";
|
||||
|
||||
string limitComponent = null;
|
||||
string propsPath = "../../../../../build/Version.props";
|
||||
if (args.Length > 1 && !doNotCloseMilestone)
|
||||
limitComponent = args[1];
|
||||
propsPath = args[1];
|
||||
|
||||
const string ReleaseNotesEnvVar = "TGS4_RELEASE_NOTES_TOKEN";
|
||||
var githubToken = Environment.GetEnvironmentVariable(ReleaseNotesEnvVar);
|
||||
@@ -237,7 +236,7 @@ namespace ReleaseNotes
|
||||
switch (releasingSuite)
|
||||
{
|
||||
case 4:
|
||||
var doc = XDocument.Load("../../../../../build/Version.props");
|
||||
var doc = XDocument.Load(propsPath);
|
||||
var project = doc.Root;
|
||||
var xmlNamespace = project.GetDefaultNamespace();
|
||||
var versionsPropertyGroup = project.Elements().First();
|
||||
@@ -309,9 +308,6 @@ namespace ReleaseNotes
|
||||
|
||||
foreach (var I in releaseDictionary.OrderBy(kvp => kvp.Key))
|
||||
{
|
||||
if (limitComponent != null && I.Key != limitComponent)
|
||||
continue;
|
||||
|
||||
newNotes.Append(Environment.NewLine);
|
||||
newNotes.Append("#### ");
|
||||
newNotes.Append(I.Key);
|
||||
|
||||
Reference in New Issue
Block a user