Skip to content

Commit 691ad4a

Browse files
committed
Fixed prepublish.
1 parent be11739 commit 691ad4a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/PostSharp.Engineering.BuildTools/Build/Files/AutoUpdatedVersionsFile.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public static bool TryWrite(
107107
thisAutoUpdatedVersionsPropertyGroupElement = new XElement( "PropertyGroup" );
108108
thisAutoUpdatedVersionsDocument.Root!.Add( thisAutoUpdatedVersionsPropertyGroupElement );
109109
}
110-
110+
111111
// Update dependency versions.
112112
var errors = 0;
113113
string? inheritedMainVersion = null;
@@ -151,6 +151,12 @@ public static bool TryWrite(
151151
continue;
152152
}
153153

154+
// Getting the inherited main version.
155+
if ( context.Product.MainVersionDependency == dependency )
156+
{
157+
inheritedMainVersion = releasedMainVersionPropertyValue;
158+
}
159+
154160
// Load dependency version from public version.
155161
var versionElementName = $"{dependency.NameWithoutDot}Version";
156162
var versionElement = thisAutoUpdatedVersionsPropertyGroupElement.Element( versionElementName );
@@ -175,12 +181,6 @@ public static bool TryWrite(
175181
hasDependenciesChanges = true;
176182

177183
context.Console.WriteMessage( $"Setting version dependency '{dependency}' from '{oldVersionValue}' to '{dependencyReleasedVersion}'." );
178-
179-
// Getting the inherited main version.
180-
if ( context.Product.MainVersionDependency == dependency )
181-
{
182-
inheritedMainVersion = releasedMainVersionPropertyValue;
183-
}
184184
}
185185

186186
// Stop here if errors.

0 commit comments

Comments
 (0)