Skip to content

Commit

Permalink
Merge branch 'release' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggog committed Aug 8, 2024
2 parents 936dc48 + a2c2593 commit 0d42102
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Xml.Linq;
using Noggog;
using NuGet.Versioning;

namespace Synthesis.Bethesda.Execution.Patchers.Git.ModifyProject;

Expand All @@ -11,13 +10,13 @@ public class AddAllReleasesToOldVersions
public void Add(
XElement proj,
Version? curSynthVersion,
NuGetVersion targetMutagenVersion,
NuGetVersion? targetSynthVersion)
Version targetMutagenVersion,
Version? targetSynthVersion)
{
if (targetSynthVersion != null
&& curSynthVersion != null
&& curSynthVersion < IntroducingSynthesisVersion
&& targetSynthVersion.Version >= IntroducingSynthesisVersion)
&& targetSynthVersion >= IntroducingSynthesisVersion)
{
foreach (var group in proj.Elements("ItemGroup"))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,7 @@ public void Modify(
if (index == -1) return version;
return version.Substring(0, index);
}

if (versions.Mutagen == null)
{
throw new ArgumentException("Target mutagen version null");
}

var targetMutagenNugetVersion = NuGetVersion.Parse(versions.Mutagen);
var targetSynthesisNugetVersion = versions.Synthesis != null ? NuGetVersion.Parse(versions.Synthesis) : default;
var trimmedMutagenVersion = TrimVersion(versions.Mutagen);
var trimmedSynthesisVersion = TrimVersion(versions.Synthesis);
foreach (var subProj in _availableProjectsRetriever.Get(solutionPath))
Expand Down Expand Up @@ -112,8 +105,11 @@ public void Modify(
{
_removeProject.Remove(projXml, "Newtonsoft.Json");
}

_addAllReleasesToOldVersions.Add(projXml, synthVersion, targetMutagenNugetVersion, targetSynthesisNugetVersion);

if (targetMutaVersion != null && targetSynthesisVersion != null)
{
_addAllReleasesToOldVersions.Add(projXml, synthVersion, targetMutaVersion, targetSynthesisVersion);
}

if (targetMutaVersion >= NamespaceMutaVersion
&& mutaVersion < NamespaceMutaVersion)
Expand Down

0 comments on commit 0d42102

Please sign in to comment.