mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-23 21:16:52 +01:00
Merge pull request #1632 from tgstation/1147-TheChangelogBiggus
ReleaseNotes/Changelog Overhaul + MariaDB CI Fix
This commit is contained in:
@@ -13,9 +13,10 @@ They will be amalgamated together in the end.
|
||||
/:cl:
|
||||
|
||||
:cl: Categories
|
||||
Categories are divided up in the release notes and set after the :cl: header.
|
||||
Categories are used by [the release notes tool](../tools/Tgstation.Server.ReleaseNotes) to generate formatted changelists used in releases.
|
||||
The default category is Core.
|
||||
The current standard categories are Core, DreamMaker API, HTTP API, and Host Watchdog.
|
||||
Only one category may be specified for a :cl: block.
|
||||
Valid categories are Core, DreamMaker API, HTTP API, Host Watchdog, Web Control Panel, Configuration, Nuget: Api, Nuget: Client, and Nuget: Common.
|
||||
/:cl:
|
||||
|
||||
[Why]: # (If this does not close or work on an existing GitHub issue, please add a short description [two lines down] of why you think these changes would benefit the server. If you can't justify it in words, it might not be worth adding.)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
name: "Check PR Has Milestone"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [ opened, edited, synchronize, reopened ]
|
||||
branches:
|
||||
- dev
|
||||
- master
|
||||
- V6
|
||||
|
||||
concurrency:
|
||||
group: "check-pr-milestone-${{ github.head_ref || github.run_id }}-${{ github.event_name }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
fail-on-bad-milestone:
|
||||
name: Fail if Pull Request has no Associated Version Milestone
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fail if no Milestone Set
|
||||
if: github.event.pull_request.milestone == null
|
||||
run: |
|
||||
echo "::error::Pull request must have milestone set!"
|
||||
exit 1
|
||||
|
||||
- name: Fail if Invalid Milestone Set
|
||||
run: |
|
||||
if [[ ${{ github.event.pull_request.milestone.title }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
exit 0
|
||||
fi
|
||||
echo "::error::Pull request has non-standard milestone!"
|
||||
exit 1
|
||||
@@ -163,12 +163,17 @@ jobs:
|
||||
fi
|
||||
exit $retval
|
||||
|
||||
dox-build:
|
||||
name: Build Doxygen Site
|
||||
pages-build:
|
||||
name: Build gh-pages
|
||||
runs-on: ubuntu-latest
|
||||
needs: start-ci-run-gate
|
||||
if: (!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success')
|
||||
steps:
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}
|
||||
|
||||
- name: Checkout (Branch)
|
||||
uses: actions/checkout@v3
|
||||
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||
@@ -179,6 +184,22 @@ jobs:
|
||||
with:
|
||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
||||
|
||||
- name: gh-pages Clone
|
||||
run: git clone -b gh-pages --single-branch "https://git@github.com/tgstation/tgstation-server" $HOME/tgsdox
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build ReleaseNotes
|
||||
run: |
|
||||
export TGS_HOST_NO_WEBPANEL=true
|
||||
dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj
|
||||
|
||||
- name: Build Changelog (Incremental)
|
||||
run: |
|
||||
cp $HOME/tgsdox/changelog.yml ./ 2>/dev/null
|
||||
dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --generate-full-notes
|
||||
|
||||
- name: Patch Doxyfile
|
||||
run: |
|
||||
VERSION=$(cat "build/Version.props" | grep -oPm1 "(?<=<TgsCoreVersion>)[^<]+")
|
||||
@@ -189,13 +210,13 @@ jobs:
|
||||
with:
|
||||
doxyfile-path: 'docs/Doxyfile'
|
||||
|
||||
- name: gh-pages push
|
||||
- name: gh-pages Push
|
||||
if: github.event_name == 'push' && github.event.ref == 'refs/heads/dev' && env.TGS_RELEASE_NOTES_TOKEN != ''
|
||||
run: |
|
||||
git clone -b gh-pages --single-branch "https://git@github.com/tgstation/tgstation-server" $HOME/tgsdox
|
||||
pushd $HOME/tgsdox
|
||||
rm -r *
|
||||
popd
|
||||
sudo mv changlog.yml $HOME/tgsdox/
|
||||
echo ./doxout/* | xargs -n 10 sudo mv -t $HOME/tgsdox
|
||||
cd $HOME/tgsdox
|
||||
git config --global push.default simple
|
||||
@@ -994,9 +1015,12 @@ jobs:
|
||||
run: |
|
||||
echo "TGS_VERSION=$(xmlstarlet sel -N X="http://schemas.microsoft.com/developer/msbuild/2003" --template --value-of /X:Project/X:PropertyGroup/X:TgsCoreVersion build/Version.props)" >> $GITHUB_ENV
|
||||
|
||||
- name: Grab Most Recent Changelog
|
||||
run: curl -L https://raw.githubusercontent.com/tgstation/tgstation-server/gh-pages/changelog.yml -o changelog.yml
|
||||
|
||||
- name: Execute Build Script (Unsigned)
|
||||
if: (!(github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev')))
|
||||
run: sudo build/package/deb/build_package.sh
|
||||
run: sudo -E build/package/deb/build_package.sh
|
||||
|
||||
- name: Execute Build Script (Signed)
|
||||
if: (github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev'))
|
||||
@@ -1204,16 +1228,18 @@ jobs:
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build ReleaseNotes
|
||||
run: dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj
|
||||
run: |
|
||||
export TGS_HOST_NO_WEBPANEL=true
|
||||
dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj
|
||||
|
||||
- name: Run ReleaseNotes Check
|
||||
run: dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --winget-template-check ${{ steps.get-sha.outputs.pr_template_sha }}
|
||||
|
||||
ci-completion-gate: # This job exists so there isn't a moving target for branch protections
|
||||
name: CI Completion Gate
|
||||
needs: [ dox-build, docker-build, build-deb, build-msi, validate-openapi-spec, upload-code-coverage, check-winget-pr-template ]
|
||||
needs: [ pages-build, docker-build, build-deb, build-msi, validate-openapi-spec, upload-code-coverage, check-winget-pr-template ]
|
||||
runs-on: ubuntu-latest
|
||||
if: (!(cancelled() || failure()) && needs.dox-build.result == 'success' && needs.docker-build.result == 'success' && needs.build-deb.result == 'success' && needs.build-msi.result == 'success' && needs.validate-openapi-spec.result == 'success' && needs.upload-code-coverage.result == 'success' && needs.check-winget-pr-template.result == 'success')
|
||||
if: (!(cancelled() || failure()) && needs.pages-build.result == 'success' && needs.docker-build.result == 'success' && needs.build-deb.result == 'success' && needs.build-msi.result == 'success' && needs.validate-openapi-spec.result == 'success' && needs.upload-code-coverage.result == 'success' && needs.check-winget-pr-template.result == 'success')
|
||||
steps:
|
||||
- name: GitHub Requires at Least One Step for a Job
|
||||
run: exit 0
|
||||
@@ -1233,9 +1259,22 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
if: (!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && contains(github.event.head_commit.message, '[APIDeploy]'))
|
||||
steps:
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build ReleaseNotes
|
||||
run: |
|
||||
$Env:TGS_HOST_NO_WEBPANEL=true
|
||||
dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj
|
||||
|
||||
- name: Parse API version
|
||||
shell: powershell
|
||||
run: |
|
||||
@@ -1249,15 +1288,24 @@ jobs:
|
||||
name: openapi-spec
|
||||
path: swagger
|
||||
|
||||
- name: Grab Most Recent Changelog
|
||||
shell: powershell
|
||||
run: |
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
Invoke-WebRequest -Uri https://raw.githubusercontent.com/tgstation/tgstation-server/gh-pages/changelog.yml -OutFile changelog.yml
|
||||
|
||||
- name: Generate Release Notes
|
||||
run: dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes ${{ env.TGS_API_VERSION }} --httpapi
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: juitnow/github-action-create-release@80dc88a9d09c0ee394a4a31b0450e8cbe62996ef # v1
|
||||
uses: actions/create-release@v1
|
||||
id: create_release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
|
||||
with:
|
||||
tag_name: api-v${{ env.TGS_API_VERSION }}
|
||||
release_name: tgstation-server API v${{ env.TGS_API_VERSION }}
|
||||
body: The TGS HTTP API
|
||||
body_path: release_notes.md
|
||||
commitish: ${{ github.event.head_commit.id }}
|
||||
|
||||
- name: Upload OpenApi Spec
|
||||
@@ -1276,9 +1324,22 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
if: (!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && contains(github.event.head_commit.message, '[DMDeploy]'))
|
||||
steps:
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build ReleaseNotes
|
||||
run: |
|
||||
$Env:TGS_HOST_NO_WEBPANEL=true
|
||||
dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj
|
||||
|
||||
- name: Parse DMAPI version
|
||||
shell: powershell
|
||||
run: |
|
||||
@@ -1291,15 +1352,24 @@ jobs:
|
||||
run: |
|
||||
&"C:/Program Files/7-Zip/7z.exe" a DMAPI.zip ./src/DMAPI/* -tzip
|
||||
|
||||
- name: Grab Most Recent Changelog
|
||||
shell: powershell
|
||||
run: |
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
Invoke-WebRequest -Uri https://raw.githubusercontent.com/tgstation/tgstation-server/gh-pages/changelog.yml -OutFile changelog.yml
|
||||
|
||||
- name: Generate Release Notes
|
||||
run: dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes ${{ env.TGS_DM_VERSION }} --dmapi
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: juitnow/github-action-create-release@v1
|
||||
uses: actions/create-release@v1
|
||||
id: create_release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
|
||||
with:
|
||||
tag_name: dmapi-v${{ env.TGS_DM_VERSION }}
|
||||
release_name: tgstation-server DMAPI v${{ env.TGS_DM_VERSION }}
|
||||
body: The TGS DMAPI \#tgs-dmapi-release
|
||||
body_path: release_notes.md
|
||||
commitish: ${{ github.event.head_commit.id }}
|
||||
|
||||
- name: Upload DMAPI Artifact
|
||||
@@ -1326,6 +1396,20 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build ReleaseNotes
|
||||
run: |
|
||||
export TGS_HOST_NO_WEBPANEL=true
|
||||
dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj
|
||||
|
||||
- name: Grab Most Recent Changelog
|
||||
run: curl -L https://raw.githubusercontent.com/tgstation/tgstation-server/gh-pages/changelog.yml -o changelog.yml
|
||||
|
||||
- name: Generate Release Notes
|
||||
run: dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes ${{ env.TGS_DM_VERSION }} --nuget
|
||||
|
||||
- name: Publish Tgstation.Server.Common to NuGet
|
||||
uses: alirezanet/publish-nuget@e276c40afeb2a154046f0997820f2a9ea74832d9 # v3.1.0
|
||||
with:
|
||||
@@ -1368,7 +1452,9 @@ jobs:
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build ReleaseNotes
|
||||
run: dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj
|
||||
run: |
|
||||
export TGS_HOST_NO_WEBPANEL=true
|
||||
dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj
|
||||
|
||||
- name: Run ReleaseNotes with --ensure-release
|
||||
run: dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --ensure-release
|
||||
@@ -1395,12 +1481,7 @@ jobs:
|
||||
cd build/package/winget
|
||||
dotnet tool restore
|
||||
|
||||
- name: Build ReleaseNotes
|
||||
run: dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj
|
||||
|
||||
# We need to rebuild the installer.exe so it can be properly signed
|
||||
- name: Restore
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build Host
|
||||
run: dotnet build -c Release src/Tgstation.Server.Host/Tgstation.Server.Host.csproj
|
||||
@@ -1408,6 +1489,9 @@ jobs:
|
||||
- name: Build Service
|
||||
run: dotnet build -c Release src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj
|
||||
|
||||
- name: Build ReleaseNotes
|
||||
run: dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj
|
||||
|
||||
- name: Prepare Artifacts
|
||||
shell: powershell
|
||||
run: build/package/winget/prepare_installer_input_artifacts.ps1
|
||||
@@ -1634,7 +1718,9 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build ReleaseNotes
|
||||
run: dotnet build -c Release tools/Tgstation.Server.ReleaseNotes
|
||||
run: |
|
||||
$Env:TGS_HOST_NO_WEBPANEL=true
|
||||
dotnet build -c Release tools/Tgstation.Server.ReleaseNotes
|
||||
|
||||
- name: Execute Push Script
|
||||
shell: powershell
|
||||
|
||||
@@ -23,6 +23,7 @@ artifacts/
|
||||
/tools/Tgstation.Server.ReleaseNotes/release_notes.md
|
||||
launchSettings.json
|
||||
release_notes.md
|
||||
changelog.yml
|
||||
*nupkg
|
||||
*.sqlite3
|
||||
packaging/
|
||||
|
||||
+2
-2
@@ -18,8 +18,8 @@
|
||||
<TgsNetMajorVersion>6</TgsNetMajorVersion>
|
||||
<!-- Update this frequently with dotnet runtime patches. MAJOR MUST MATCH ABOVE! -->
|
||||
<TgsDotnetRedistUrl>https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/6.0.21/dotnet-hosting-6.0.21-win.exe</TgsDotnetRedistUrl>
|
||||
<TgsMariaDBRedistVersion>11.0.2</TgsMariaDBRedistVersion>
|
||||
<TgsMariaDBRedistVersion>10.11.5</TgsMariaDBRedistVersion>
|
||||
<!-- The two versions must match above, this is referenced by XML readers in scripts so we can't use an MSBuild property reference -->
|
||||
<TgsMariaDBRedistUrl>https://ftp.osuosl.org/pub/mariadb/mariadb-11.0.2/winx64-packages/mariadb-11.0.2-winx64.msi</TgsMariaDBRedistUrl>
|
||||
<TgsMariaDBRedistUrl>https://ftp.osuosl.org/pub/mariadb//mariadb-10.11.5/winx64-packages/mariadb-10.11.5-winx64.msi</TgsMariaDBRedistUrl>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
@@ -31,8 +31,13 @@ dh_make -p tgstation-server_$TGS_VERSION -y --createorig -s
|
||||
|
||||
rm -f debian/README* debian/changelog debian/*.ex debian/upstream/*.ex
|
||||
|
||||
pushd ..
|
||||
export TGS_HOST_NO_WEBPANEL=true
|
||||
dotnet run -c Release --project tools/Tgstation.Server.ReleaseNotes $TGS_VERSION --debian packaging/debian/changelog $CURRENT_COMMIT
|
||||
export TGS_HOST_NO_WEBPANEL=false
|
||||
popd
|
||||
|
||||
cp -r build/package/deb/debian/* debian/
|
||||
sed -i "s/~!VERSION!~/$TGS_VERSION/g" debian/changelog
|
||||
|
||||
cp build/tgstation-server.service debian/
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
tgstation-server (~!VERSION!~-1) unstable; urgency=medium
|
||||
|
||||
* Package changelogs are currently stubs. They will be auto-generated in the future (https://github.com/tgstation/tgstation-server/issues/1147). Refer to GitHub release for changelog: https://github.com/tgstation/tgstation-server/releases/tag/tgstation-server-v~!VERSION!~
|
||||
|
||||
-- Jordan Dominion <Cyberboss@users.noreply.github.com> Mon, 19 Jun 2023 16:14:13 +0000
|
||||
@@ -6,7 +6,7 @@
|
||||
<Version>$(TgsApiLibraryVersion)</Version>
|
||||
<Description>API definitions for tgstation-server.</Description>
|
||||
<PackageTags>json web api tgstation-server tgstation ss13 byond http</PackageTags>
|
||||
<PackageReleaseNotes>Added support for -map-threads DreamDaemon parameter and UploadZip Administration update option.</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>$(TGS_NUGET_RELEASE_NOTES_API)</PackageReleaseNotes>
|
||||
<NoWarn>CA1028</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<Version>$(TgsClientVersion)</Version>
|
||||
<Description>Client library for tgstation-server.</Description>
|
||||
<PackageTags>json web api tgstation-server tgstation ss13 byond client http</PackageTags>
|
||||
<PackageReleaseNotes>Added support for .zip uploads for server updates. Added missing Dispose() call to the StringContents for requests with bodies and added missing ConfigureAwait(false) to async call.</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>$(TGS_NUGET_RELEASE_NOTES_CLIENT)</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<Version>$(TgsCommonLibraryVersion)</Version>
|
||||
<Description>Common functions for tgstation-server.</Description>
|
||||
<PackageTags>web tgstation-server tgstation ss13 byond client http</PackageTags>
|
||||
<PackageReleaseNotes>Added CachedResponseStream.</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>$(TGS_NUGET_RELEASE_NOTES_COMMON)</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -15,7 +15,18 @@ namespace Tgstation.Server.Host.Configuration
|
||||
/// <summary>
|
||||
/// If the control panel is enabled.
|
||||
/// </summary>
|
||||
public bool Enable { get; set; }
|
||||
public bool Enable
|
||||
#if NO_WEBPANEL
|
||||
{
|
||||
get => false;
|
||||
set => _ = value;
|
||||
}
|
||||
#else
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// If any origin is allowed for CORS requests. This overrides <see cref="AllowedOrigins"/>.
|
||||
|
||||
@@ -508,7 +508,11 @@ namespace Tgstation.Server.Host.Core
|
||||
});
|
||||
}
|
||||
else
|
||||
#if NO_WEBPANEL
|
||||
logger.LogTrace("Web control panel was not included in TGS build!");
|
||||
#else
|
||||
logger.LogTrace("Web control panel disabled!");
|
||||
#endif
|
||||
|
||||
// Do not cache a single thing beyond this point, it's all API
|
||||
applicationBuilder.UseDisabledClientCache();
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Tgstation.Server.Host.Extensions.Converters
|
||||
/// <summary>
|
||||
/// <see cref="JsonConverter"/> and <see cref="IYamlTypeConverter"/> for serializing <see cref="global::System.Version"/>s in semver format.
|
||||
/// </summary>
|
||||
sealed class VersionConverter : JsonConverter, IYamlTypeConverter
|
||||
public sealed class VersionConverter : JsonConverter, IYamlTypeConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Check if the <see cref="VersionConverter"/> supports (de)serializing a given <paramref name="type"/>.
|
||||
@@ -35,6 +35,8 @@ namespace Tgstation.Server.Host.Extensions.Converters
|
||||
/// <inheritdoc />
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(writer);
|
||||
|
||||
if (value == null)
|
||||
{
|
||||
writer.WriteNull();
|
||||
|
||||
@@ -18,7 +18,11 @@
|
||||
<DefineConstants>$(DefineConstants);WATCHDOG_FREE_RESTART</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="ClientInstall" BeforeTargets="ResolveAssemblyReferences" Inputs="../../build/ControlPanelVersion.props" Outputs="$(NpmInstallStampFile)">
|
||||
<PropertyGroup Condition="'$(TGS_HOST_NO_WEBPANEL)' == 'true'">
|
||||
<DefineConstants>$(DefineConstants);NO_WEBPANEL</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Condition="'$(TGS_HOST_NO_WEBPANEL)' != 'true'" Name="ClientInstall" BeforeTargets="ResolveAssemblyReferences" Inputs="../../build/ControlPanelVersion.props" Outputs="$(NpmInstallStampFile)">
|
||||
<Message Text="Pulling web control panel..." Importance="high" />
|
||||
<RemoveDir Directories="ClientApp" />
|
||||
<Exec Command="git clone https://github.com/tgstation/tgstation-server-webpanel --branch v$(TgsControlPanelVersion) --depth 1 ClientApp" />
|
||||
@@ -28,7 +32,7 @@
|
||||
<Touch Files="$(NpmInstallStampFile)" AlwaysCreate="true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="NpmBuild" BeforeTargets="BeforeBuild" DependsOnTargets="ClientInstall" Inputs="../../build/ControlPanelVersion.props" Outputs="wwwroot\index.html">
|
||||
<Target Condition="'$(TGS_HOST_NO_WEBPANEL)' != 'true'" Name="NpmBuild" BeforeTargets="BeforeBuild" DependsOnTargets="ClientInstall" Inputs="../../build/ControlPanelVersion.props" Outputs="wwwroot\index.html">
|
||||
<Message Text="Building web control panel..." Importance="high" />
|
||||
<Exec WorkingDirectory="ClientApp" Command="npx --yes yarn run msbuild" />
|
||||
</Target>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Octokit;
|
||||
|
||||
namespace Tgstation.Server.ReleaseNotes
|
||||
{
|
||||
sealed class Change
|
||||
{
|
||||
public List<string> Descriptions { get; set; }
|
||||
public string Author { get; set; }
|
||||
public int PullRequest { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Tgstation.Server.ReleaseNotes
|
||||
{
|
||||
sealed class Changelist
|
||||
{
|
||||
public Version Version { get; set; }
|
||||
|
||||
public Dictionary<Component, Version> ComponentVersions { get; set; }
|
||||
|
||||
public List<Change> Changes { get; set; }
|
||||
|
||||
public bool Unreleased { get; set; }
|
||||
|
||||
public void DeduplicateChanges()
|
||||
{
|
||||
Changes = Changes
|
||||
.OrderBy(x => x.PullRequest)
|
||||
.GroupBy(x => x.PullRequest)
|
||||
.Select(prChanges =>
|
||||
{
|
||||
string author = null;
|
||||
return new Change
|
||||
{
|
||||
PullRequest = prChanges.Key,
|
||||
Descriptions = prChanges
|
||||
.SelectMany(x =>
|
||||
{
|
||||
if (author != null)
|
||||
Debug.Assert(x.Author == author);
|
||||
else
|
||||
author = x.Author;
|
||||
|
||||
return x.Descriptions;
|
||||
})
|
||||
.ToList(),
|
||||
Author = author
|
||||
};
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public void StripConfigVersionMessage()
|
||||
{
|
||||
foreach (var change in Changes)
|
||||
change.Descriptions.RemoveAll(desc => Regex.IsMatch(desc, "The new config.* version is"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace Tgstation.Server.ReleaseNotes
|
||||
{
|
||||
enum Component
|
||||
{
|
||||
Configuration,
|
||||
Core,
|
||||
HostWatchdog,
|
||||
WebControlPanel,
|
||||
HttpApi,
|
||||
DreamMakerApi,
|
||||
InteropApi,
|
||||
NugetCommon,
|
||||
NugetApi,
|
||||
NugetClient,
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Tgstation.Server.ReleaseNotes
|
||||
{
|
||||
sealed class ReleaseNotes
|
||||
{
|
||||
public SortedDictionary<Component, List<Changelist>> Components { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -7,10 +7,12 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Usage: GitHub.com general interop -->
|
||||
<PackageReference Include="Octokit" Version="7.1.0" />
|
||||
<!-- Usage: GitHub Discussions interop -->
|
||||
<PackageReference Include="Octokit.GraphQL" Version="0.2.1-beta" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Tgstation.Server.Host\Tgstation.Server.Host.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user