Skip to content

Commit 0780272

Browse files
committed
Merge branch 'development'
2 parents d8544ad + 366493c commit 0780272

File tree

6 files changed

+50
-9
lines changed

6 files changed

+50
-9
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,11 @@ jobs:
173173
uses: actions/download-artifact@v2
174174
with:
175175
name: nuget-binaries
176+
path: output
176177

177178
- name: NuGet Publish
178179
run: dotnet nuget push output/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json
179-
180+
180181
- name: GitHub Publish
181182
run: dotnet nuget push output/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/nwn-dotnet/index.json
182183

@@ -192,7 +193,8 @@ jobs:
192193
uses: actions/download-artifact@v2
193194
with:
194195
name: nuget-binaries
195-
196+
path: output
197+
196198
- name: Remove NuGet packages
197199
run: rm output/*nupkg
198200

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

6+
## 8193.33.4
7+
https://github.com/nwn-dotnet/Anvil/compare/v8193.33.3...v8193.33.4
8+
9+
### Package Updates
10+
- (Docker) Update NWNX to [16b2c88](https://github.com/nwnxee/unified/commit/16b2c88b1f3e0ff929a8cad759090ce98d7d0b3c).
11+
12+
### Changed
13+
- Startup log now includes the git revision of the current running server binary.
14+
- Server revision is now printed to stdout if startup fails.
15+
616
## 8193.33.3
717
https://github.com/nwn-dotnet/Anvil/compare/v8193.33.2...v8193.33.3
818

NWN.Anvil/NWN.Anvil.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
1212
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
13+
<SourceControlInformationFeatureSupported>true</SourceControlInformationFeatureSupported>
1314
<EnableDynamicLoading>true</EnableDynamicLoading>
1415

1516
<NoWarn>1591</NoWarn>
@@ -82,6 +83,12 @@
8283
<Compile Remove="docs\**" />
8384
</ItemGroup>
8485

86+
<Target Name="SetSourceRevisionId" BeforeTargets="InitializeSourceControlInformation">
87+
<Exec Command="git describe --long --always --dirty --exclude=* --abbrev=8" ConsoleToMSBuild="True" IgnoreExitCode="False">
88+
<Output PropertyName="SourceRevisionId" TaskParameter="ConsoleOutput" />
89+
</Exec>
90+
</Target>
91+
8592
<Target Name="ZipOutputPath" AfterTargets="Build">
8693
<ZipDirectory Overwrite="true" SourceDirectory="$(OutputPath)" DestinationFile="$(OutputPath)\..\$(MSBuildProjectName).zip" />
8794
</Target>

NWN.Anvil/src/main/AnvilCore.cs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,27 @@ void IServerLifeCycleEventHandler.HandleLifeCycleEvent(LifeCycleEvent eventType)
103103
private void InitCore()
104104
{
105105
loggerManager.Init();
106-
PrelinkNative();
106+
107+
try
108+
{
109+
PrelinkNative();
110+
}
111+
catch (Exception e)
112+
{
113+
Log.Fatal(e, "Failed to load {Name:l} {Version:l} (NWN.Core: {CoreVersion}, NWN.Native: {NativeVersion})",
114+
Assemblies.Anvil.GetName().Name,
115+
AssemblyInfo.VersionInfo.InformationalVersion,
116+
Assemblies.Core.GetName().Version,
117+
Assemblies.Native.GetName().Version);
118+
throw;
119+
}
120+
107121
loggerManager.InitVariables();
108122
unhandledExceptionLogger.Init();
109123

110-
AssemblyName anvilAssemblyName = Assemblies.Anvil.GetName();
111-
112-
Log.Info("Loading {Name} {Version} (NWN.Core: {CoreVersion}, NWN.Native: {NativeVersion})",
113-
anvilAssemblyName.Name,
114-
anvilAssemblyName.Version,
124+
Log.Info("Loading {Name:l} {Version:l} (NWN.Core: {CoreVersion}, NWN.Native: {NativeVersion})",
125+
Assemblies.Anvil.GetName().Name,
126+
AssemblyInfo.VersionInfo.InformationalVersion,
115127
Assemblies.Core.GetName().Version,
116128
Assemblies.Native.GetName().Version);
117129

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using System.Reflection;
2+
3+
namespace Anvil.Internal
4+
{
5+
internal static class AssemblyInfo
6+
{
7+
public static readonly AssemblyInformationalVersionAttribute VersionInfo = typeof(AssemblyInfo).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
8+
}
9+
}

dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Configure nwserver to run with nwnx
2-
FROM nwnxee/unified:864fb00
2+
FROM nwnxee/unified:16b2c88
3+
34
ARG BINARY_PATH
45
COPY ${BINARY_PATH} /nwn/anvil/
56

0 commit comments

Comments
 (0)