Skip to content

Commit 4493cbf

Browse files
authored
Merge pull request #1819 from JetBrains/bug/changelog-notes
Fix minor issues with changelog notes
2 parents e6763dc + 13d7015 commit 4493cbf

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

rider/backend.gradle

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,18 @@ task packReSharperPlugin(type: nugetPack.class) {
4040
group = backendGroup
4141
description = 'Packs resulting DLLs into a NuGet package which is an R# extension.'
4242

43-
def changelogNotes = changelog.get(productVersion).withFilter({ line ->
43+
def changelogNotes = changelog.get(pluginVersion).withFilter({ line ->
4444
!line.startsWith("- Rider:") && !line.startsWith("- Unity editor:")
4545
}).toPlainText().trim()
46-
def ReleaseNotes = """New in $productVersion
46+
47+
// There's a bug in the changelog plugin that adds extra newlines on Windows, possibly
48+
// due to Unix/Windows line ending mismatch.
49+
// Remove this hack once JetBrains/gradle-changelog-plugin#8 is fixed
50+
if (isWindows) {
51+
changelogNotes = changelogNotes.replaceAll("\n\n", "\r\n")
52+
}
53+
54+
def ReleaseNotes = """New in $pluginVersion
4755
4856
${changelogNotes}
4957

rider/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ plugins {
1616
ext.repoRoot = project.file("..")
1717
ext.isWindows = Os.isFamily(Os.FAMILY_WINDOWS)
1818
ext.bundledRiderSdkRoot = new File(projectDir, "dependencies") // SDK from TC configuration/artifacts
19+
ext.pluginVersion = ext.productVersion + "." + ext.maintenanceVersion
1920

2021
repositories {
2122
maven { url "https://cache-redirector.jetbrains.com/intellij-repository/snapshots" }
@@ -36,7 +37,7 @@ wrapper {
3637
distributionUrl = "https://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
3738
}
3839

39-
version "${productVersion}.0.$BuildCounter"
40+
version "${pluginVersion}.$BuildCounter"
4041

4142
ext.buildServer = BuildServerKt.initBuildServer(gradle)
4243
if (buildServer.automatedBuild) {

rider/frontend.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ intellij {
7171
patchPluginXml {
7272
changeNotes """
7373
<body>
74-
<p><b>New in $productVersion</b></p>
74+
<p><b>New in $pluginVersion</b></p>
7575
<p>
76-
${changelog.get(productVersion).toHTML()}
76+
${changelog.get(pluginVersion).toHTML()}
7777
</p>
7878
<p>See the <a href="https://github.com/JetBrains/resharper-unity/blob/net202/CHANGELOG.md">CHANGELOG</a> for more details and history.</p>
7979
</body>

rider/gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
BuildCounter=9999
66
BuildConfiguration=Debug
77

8+
# Base version for SDK resolution. Also used for plugin version
89
productVersion=2020.2
10+
# Revision for plugin version, appended to productVersion, e.g. 2020.2.2
11+
# Used for published version, plus retrieving correct changelog notes
12+
# TODO: Should ideally come from the TC build. Manually incrementing for each release is error prone (RIDER-49929)
13+
maintenanceVersion=2
914

1015
# Set to "true" on the command line to skip building the dotnet tasks, as a no-op
1116
# nuget restore and msbuild takes too long

0 commit comments

Comments
 (0)