Skip to content

Commit 2ca8b40

Browse files
committed
centralize version management and bump to 2.0.2
- Use integrations/Unity/package.json as single source of truth for version - Directory.Build.props reads version from package.json at build time (matching colyseus-unity-sdk pattern) - Remove hardcoded Version from .csproj files - Update CI workflow to use renamed colyseus.nativewebsocket.asmdef
1 parent 5fd5707 commit 2ca8b40

5 files changed

Lines changed: 14 additions & 5 deletions

File tree

.github/workflows/unity-upm-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
cp integrations/Unity/WebSocketFactoryWebGL.cs upm-package/WebSocket/
5252
cp integrations/Unity/WebSocket.jslib upm-package/WebSocket/
5353
cp integrations/Unity/WebSocket.jspre upm-package/WebSocket/
54-
cp integrations/Unity/endel.nativewebsocket.asmdef upm-package/WebSocket/
54+
cp integrations/Unity/colyseus.nativewebsocket.asmdef upm-package/WebSocket/
5555
5656
# Package metadata and samples
5757
cp integrations/Unity/package.json upm-package/
@@ -90,7 +90,7 @@ jobs:
9090
cp integrations/Unity/WebSocketFactoryWebGL.cs upm-package/Assets/WebSocket/
9191
cp integrations/Unity/WebSocket.jslib upm-package/Assets/WebSocket/
9292
cp integrations/Unity/WebSocket.jspre upm-package/Assets/WebSocket/
93-
cp integrations/Unity/endel.nativewebsocket.asmdef upm-package/Assets/WebSocket/
93+
cp integrations/Unity/colyseus.nativewebsocket.asmdef upm-package/Assets/WebSocket/
9494
9595
# Package metadata
9696
cp integrations/Unity/package.json upm-package/Assets/

Directory.Build.props

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project>
2+
<!-- Version is read from integrations/Unity/package.json (single source of truth) -->
3+
<Target Name="SetVersionFromPackageJson" BeforeTargets="PrepareForBuild;GenerateNuspec">
4+
<Exec Command="python3 -c &quot;import json; print(json.load(open('$(MSBuildThisFileDirectory)integrations/Unity/package.json'))['version'])&quot;" ConsoleToMSBuild="true">
5+
<Output TaskParameter="ConsoleOutput" PropertyName="PackageVersion" />
6+
</Exec>
7+
<PropertyGroup>
8+
<Version>$(PackageVersion)</Version>
9+
</PropertyGroup>
10+
</Target>
11+
</Project>

integrations/MonoGame/NativeWebSocket.MonoGame.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<TargetFramework>net6.0</TargetFramework>
44
<RootNamespace>NativeWebSocket.MonoGame</RootNamespace>
55
<AssemblyName>NativeWebSocket.MonoGame</AssemblyName>
6-
<Version>2.0.1</Version>
76
<Authors>Endel Dreyer</Authors>
87
<Description>MonoGame integration for NativeWebSocket - provides a GameComponent that enables automatic main-thread event dispatching.</Description>
98
<PackageId>Colyseus.NativeWebSocket.MonoGame</PackageId>

integrations/Unity/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.endel.nativewebsocket",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "WebSocket client for Unity - with no external dependencies (WebGL, Native, Android, iOS, UWP). Events auto-dispatch to the main thread via SynchronizationContext.",
55
"license": "MIT",
66
"repository": {

src/NativeWebSocket/NativeWebSocket.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
44
<RootNamespace>NativeWebSocket</RootNamespace>
55
<AssemblyName>NativeWebSocket</AssemblyName>
6-
<Version>2.0.1</Version>
76
<Authors>Endel Dreyer</Authors>
87
<Description>WebSocket client for .NET - works with Unity, MonoGame, Godot, and any .NET application.</Description>
98
<PackageId>Colyseus.NativeWebSocket</PackageId>

0 commit comments

Comments
 (0)