Skip to content

Commit d4e15a4

Browse files
committed
Merge branch 'develop' into main
2 parents 3fdb797 + da60689 commit d4e15a4

5 files changed

Lines changed: 57 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88
-->
99

10+
## [2.0.4] - 2022-12-29
11+
12+
### Added
13+
14+
- Support for OpenUPM package
15+
1016
## [2.0.3] - 2022-12-28
1117

1218
### Added

VoxReader/VoxReader.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@
1414
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1515
<NoWarn>1591</NoWarn>
1616
</PropertyGroup>
17+
18+
<ItemGroup>
19+
<None Remove="com.sandrofigo.voxreader.asmdef" />
20+
<None Remove="package.json" />
21+
</ItemGroup>
1722

1823
</Project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "com.sandrofigo.voxreader",
3+
"rootNamespace": "",
4+
"references": [],
5+
"includePlatforms": [],
6+
"excludePlatforms": [],
7+
"allowUnsafeCode": false,
8+
"overrideReferences": false,
9+
"precompiledReferences": [],
10+
"autoReferenced": true,
11+
"defineConstraints": [],
12+
"versionDefines": [],
13+
"noEngineReferences": false
14+
}

VoxReader/package.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "com.sandrofigo.voxreader",
3+
"version": "2.0.4",
4+
"displayName": "VoxReader",
5+
"description": "A C# library to read .vox files created with MagicaVoxel",
6+
"documentationUrl": "https://github.com/sandrofigo/VoxReader",
7+
"changelogUrl": "https://github.com/sandrofigo/VoxReader/blob/main/CHANGELOG.md",
8+
"licensesUrl": "https://github.com/sandrofigo/VoxReader/blob/main/LICENSE.md",
9+
"dependencies": {
10+
},
11+
"keywords": [
12+
"parser",
13+
"voxel",
14+
"reader",
15+
"vox",
16+
"magicavoxel"
17+
],
18+
"author": {
19+
"name": "Sandro Figo",
20+
"url": "https://sandrofigo.com"
21+
}
22+
}

build/Build.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System;
22
using System.IO;
33
using Microsoft.AspNetCore.StaticFiles;
4+
using Newtonsoft.Json;
5+
using Newtonsoft.Json.Linq;
46
using NuGet.Versioning;
57
using Nuke.Common;
68
using Nuke.Common.ChangeLog;
@@ -56,6 +58,14 @@ protected override void OnBuildInitialized()
5658
// Validate latest version in changelog file matches the version tag in git
5759
Assert.True(ChangelogTasksExtensions.TryGetLatestVersionInChangelog(RootDirectory / "CHANGELOG.md", out SemanticVersion version, out string rawVersionValue) && version == GitRepository.GetLatestVersionTag(),
5860
$"Latest version '{rawVersionValue}' in the changelog file does not match the version tag '{GitRepository.GetLatestVersionTag()}'!");
61+
62+
// Verify version in Unity package file matches the version tag in git
63+
dynamic packageFile = JsonConvert.DeserializeObject(File.ReadAllText(Solution.VoxReader.Directory / "package.json"));
64+
SemanticVersion versionInPackageFile = SemanticVersion.Parse(packageFile.version.ToString());
65+
66+
SemanticVersion versionTag = GitRepository.GetLatestVersionTag();
67+
68+
Assert.True(versionInPackageFile == versionTag, $"The version '{versionInPackageFile}' in the Unity package file does not match the latest version tag '{versionTag}'!");
5969
}
6070
}
6171

0 commit comments

Comments
 (0)