Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ jobs:
run: |
dotnet test ReferenceReplacement.sln --configuration Release --no-build

- name: Verify release version
if: startsWith(github.ref, 'refs/tags/v')
shell: pwsh
run: |
$expected = $env:GITHUB_REF_NAME.TrimStart('v')
$assemblyPath = Resolve-Path 'src/ReferenceReplacement/bin/Release/net10.0/ReferenceReplacement.dll'
$actual = [System.Reflection.AssemblyName]::GetAssemblyName($assemblyPath).Version.ToString(3)
if ($actual -ne $expected) {
throw "Release tag $expected does not match assembly version $actual."
}

- name: Prepare release assets
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
Expand Down
36 changes: 0 additions & 36 deletions GitVersion.yml

This file was deleted.

8 changes: 4 additions & 4 deletions src/ReferenceReplacement/ReferenceReplacement.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>0.2.1</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(EnableResoniteHotReloadLib)'=='true'">
<DefineConstants>$(DefineConstants);USE_RESONITE_HOT_RELOAD_LIB</DefineConstants>
</PropertyGroup>
Expand All @@ -25,10 +29,6 @@
</Reference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0" PrivateAssets="all" />
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(CopyToMods)'=='true'">
<PropertyGroup>
<_ResoniteModsDir>$(ResolvedResonitePath)/rml_mods</_ResoniteModsDir>
Expand Down
6 changes: 5 additions & 1 deletion src/ReferenceReplacement/ReferenceReplacementMod.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Reflection;

using FrooxEngine;

Expand All @@ -15,7 +16,10 @@ namespace ReferenceReplacement;

public class ReferenceReplacementMod : ResoniteMod
{
public static readonly string VersionTag = GitVersionInformation.FullSemVer;
public static readonly string VersionTag =
typeof(ReferenceReplacementMod)
.Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
?.InformationalVersion.Split('+')[0] ?? "0.2.1";
private const string HarmonyId = "com.nekometer.esnya.reference-replacement";
private const string CreationMenuCategory = "Editor";
private const string CreationMenuLabel = "Reference Replacement (Mod)";
Expand Down
Loading