Skip to content

Commit

Permalink
Fix rider package generation
Browse files Browse the repository at this point in the history
  • Loading branch information
lconstan committed Dec 9, 2022
1 parent 7061d1b commit 7e3f576
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Abc.MoqComplete/Deployment/build_rider_plugin.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
$artifactDirectory = $args[0]
$PluginId = "Abc.MoqComplete"
$BuildPropsFilePath = "Abc.MoqComplete\Directory.Build.props"
$PluginPropsFilePath = "Abc.MoqComplete\Plugin.props"

# Get the version number
if (Test-Path $BuildPropsFilePath) {
$PluginXml = [xml] (Get-Content $BuildPropsFilePath)
$Version = $PluginXml.SelectSingleNode(".//Project/PropertyGroup/Version").innerText
$BuildPropsXml = [xml] (Get-Content $BuildPropsFilePath)
$PluginPropsXml = [xml] (Get-Content $PluginPropsFilePath)
$Version = $BuildPropsXml.SelectSingleNode(".//Project/PropertyGroup/Version").innerText
$SdkVersion = $PluginPropsXml.SelectSingleNode(".//Project/PropertyGroup/SdkVersion").innerText
Write-Host "Version is $Version SdkVersion is $SdkVersion"
$Version = $Version.Replace("`$(SdkVersion)", $SdkVersion)
}

Write-Host "Generating Rider package"
Expand Down
2 changes: 1 addition & 1 deletion Abc.MoqComplete/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<PropertyGroup>
<!-- The version of the MoqComplete plugin -->
<Version>$(SdkVersion).1</Version>
<Version>$(SdkVersion).0</Version>
</PropertyGroup>

</Project>

0 comments on commit 7e3f576

Please sign in to comment.