Skip to content

Commit

Permalink
Fix rider version build
Browse files Browse the repository at this point in the history
  • Loading branch information
olsh committed Apr 10, 2021
1 parent a59e21f commit cf2cb45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Text;
using System.Text.RegularExpressions;


using Nuke.Common;
using Nuke.Common.CI;
using Nuke.Common.CI.AppVeyor;
Expand Down Expand Up @@ -130,14 +129,15 @@ protected override void OnBuildInitialized()
var sourceMetaFolder = RootDirectory / "src" / riderMetaDirectoryName;
var targetMetaFolder = tempDirectory / riderMetaDirectoryName;
CopyDirectoryRecursively(sourceMetaFolder, targetMetaFolder);
CopyFile(NuGetPackagePath, tempDirectory / NuGetPackageFileName);
CopyFile(NuGetPackagePath, tempDirectory / riderMetaDirectoryName / NuGetPackageFileName);
var riderMetaFile = targetMetaFolder / "META-INF" / "plugin.xml";
XmlPoke(riderMetaFile, "idea-plugin/version", ExtensionVersion);
XmlPoke(riderMetaFile, "idea-plugin/idea-version/@since-build", WaveMajorVersion);
XmlPoke(riderMetaFile, "idea-plugin/idea-version/@until-build", WaveMajorVersion + ".*");
// We should re-save wile with UTF-8 without BOM, otherwise Rider fails to install plugin
// This workaround can be removed when the feature will be released https://github.com/nuke-build/nuke/pull/734
File.WriteAllText(riderMetaFile, File.ReadAllText(riderMetaFile), new UTF8Encoding(false));
CompressZip(tempDirectory, RiderPackagePath, fileMode: FileMode.Create);
Expand Down

0 comments on commit cf2cb45

Please sign in to comment.