Skip to content

Commit

Permalink
Allow MonoGameVersion to be overridden
Browse files Browse the repository at this point in the history
  • Loading branch information
dellis1972 committed Oct 14, 2024
1 parent 2a1a664 commit bfc04aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<AutoRestoreMGCBTool Condition="'$(AutoRestoreMGCBTool)' == ''">true</AutoRestoreMGCBTool>
<MGCBToolDirectory>$(MSBuildThisFileDirectory)dotnet-tools/</MGCBToolDirectory>
<MGCBCommand Condition="'$(MGCBCommand)' == ''">mgcb</MGCBCommand>
<MonoGameVersion>3.8.1.1-develop</MonoGameVersion>
<MonoGameVersion Condition="'$(MonoGameVersion)' == ''">3.8.1.1-develop</MonoGameVersion>
</PropertyGroup>

</Project>
4 changes: 2 additions & 2 deletions build/BuildToolsTasks/BuildMGCBTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public override void Run(BuildContext context)
{
context.ReplaceRegexInFiles(
"Tools/MonoGame.Content.Builder.Task/MonoGame.Content.Builder.Task.props",
@"<MonoGameVersion>([^\s]*)<\/MonoGameVersion>",
$"<MonoGameVersion>{context.Version}</MonoGameVersion>",
@"<MonoGameVersion Condition=""'$(MonoGameVersion)' == ''"">([^\s]*)<\/MonoGameVersion>",
$"<MonoGameVersion Condition=""'$(MonoGameVersion)' == ''"">{context.Version}</MonoGameVersion>",
RegexOptions.Singleline
);
}
Expand Down

0 comments on commit bfc04aa

Please sign in to comment.