Skip to content

Commit

Permalink
Fix assembly info pre processor
Browse files Browse the repository at this point in the history
  • Loading branch information
FejZa committed May 5, 2024
1 parent 5d7b2b7 commit 7838df6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Editor/Utilities/AssemblyDefinitionPreProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,17 @@ private void OnPreprocessAsset()
var text = File.ReadAllText(assetPath);
var packageJson = JsonUtility.FromJson<PackageInfo>(text);

if (!packageJson.Name.Contains("com.xrtk"))
if (!packageJson.Name.Contains("com.realitycollective") &&
!packageJson.Name.Contains("com.realitytoolkit"))
{
return;
}

var packageVersion = packageJson.Version;

if (packageVersion.Contains("-preview."))
if (packageVersion.Contains("-pre."))
{
packageVersion = packageVersion.Substring(0, packageVersion.IndexOf("-", StringComparison.Ordinal));
packageVersion = packageVersion[..packageVersion.IndexOf("-", StringComparison.Ordinal)];
}

var newVersion = $"[assembly: AssemblyVersion(\"{packageVersion}\")]";
Expand All @@ -67,8 +68,8 @@ private void OnPreprocessAsset()
[assembly: AssemblyVersion(""0.0.0"")]
[assembly: AssemblyTitle(""com.{assemblyName}"")]
[assembly: AssemblyCompany(""XRTK"")]
[assembly: AssemblyCopyright(""Copyright (c) XRTK. All rights reserved."")]
[assembly: AssemblyCompany(""Reality Collective"")]
[assembly: AssemblyCopyright(""Copyright (c) Reality Collective. All rights reserved."")]
"
: File.ReadAllText(assemblyInfoPath);

Expand Down

0 comments on commit 7838df6

Please sign in to comment.