Skip to content

Commit

Permalink
Add debian changelog support
Browse files Browse the repository at this point in the history
Fix some other issues as well
  • Loading branch information
Cyberboss committed Aug 20, 2023
1 parent 45de815 commit 0b35e29
Show file tree
Hide file tree
Showing 5 changed files with 308 additions and 55 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,9 @@ 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
Expand Down
7 changes: 6 additions & 1 deletion build/package/deb/build_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 $(git rev-parse HEAD)
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/

Expand Down
7 changes: 7 additions & 0 deletions tools/Tgstation.Server.ReleaseNotes/Changelist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text.RegularExpressions;

namespace Tgstation.Server.ReleaseNotes
{
Expand Down Expand Up @@ -42,5 +43,11 @@ public void DeduplicateChanges()
})
.ToList();
}

public void StripConfigVersionMessage()
{
foreach (var change in Changes)
change.Descriptions.RemoveAll(desc => Regex.IsMatch(desc, "The new config.* version is"));
}
}
}
6 changes: 3 additions & 3 deletions tools/Tgstation.Server.ReleaseNotes/Component.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
{
enum Component
{
Configuration,
Core,
HostWatchdog,
WebControlPanel,
HttpApi,
Configuration,
DreamMakerApi,
InteropApi,
WebControlPanel,
HostWatchdog,
NugetCommon,
NugetApi,
NugetClient,
Expand Down
Loading

0 comments on commit 0b35e29

Please sign in to comment.