Skip to content

Commit

Permalink
fix: change notes section fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
iromeo committed Apr 8, 2023
1 parent 5f02082 commit 29a5d83
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 19 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@

# SnakeCharm Plugin Changelog

## [2023.1.SNAPSHOT]
Released on ...
## [2023.1.1]
Released on 9 April 2023

### Fixed
- Compatibility with PyCharm 2023.1 #505 (see [#501](https://github.com/JetBrains-Research/snakecharm/issues/505))
- Exception: "Access is allowed from write thread only" creating project in dumb mode (see [#506](https://github.com/JetBrains-Research/snakecharm/issues/506))
- Make Snakecharm trusted plugins, even though it is provided not by JetBrains but by JetBrains Research (see [#503](https://github.com/JetBrains-Research/snakecharm/issues/503))
- TODO #NNN (see [#NNN](https://github.com/JetBrains-Research/snakecharm/issues/NNN))
- Empty `What's New` section fixed

### Changed:
- Bundled snakemake wrappers list updated to `v1.25.0`
- TODO #NNN (see [#NNN](https://github.com/JetBrains-Research/snakecharm/issues/NNN))
- Plugin versioning changed, now minor version is not CI build, just manual counter

## [2022.3.771]
Released on December 7th 2022
Expand Down
36 changes: 23 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@file:Suppress("SpellCheckingInspection")

import org.jetbrains.changelog.date
import org.jetbrains.changelog.exceptions.MissingVersionException
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

Expand All @@ -23,7 +23,12 @@ plugins {
}

group = properties("pluginGroup")
version = "${properties("pluginVersion")}.${properties("pluginBuildCounter")}${properties("pluginPreReleaseSuffix")}"
if (properties("pluginPreReleaseSuffix").isEmpty()) {
version = "${properties("pluginVersion")}${properties("pluginPreReleaseSuffix")}"
} else {
version =
"${properties("pluginVersion")}${properties("pluginPreReleaseSuffix")}.${properties("pluginBuildCounter")}"
}

// Configure project's dependencies
repositories {
Expand Down Expand Up @@ -96,12 +101,7 @@ changelog {
headerParserRegex.set("""(\d+\.\d+.(\d+|SNAPSHOT)(-\w+)?)""".toRegex())

// Optionally generate changed commits list url.
// NB: At the moment url title will be same as current version in changelog and in our case it is with 'SNAPSHOT'
// tag instead of real build number => title will be not very nice-looking
//repositoryUrl.set("https://github.com/JetBrains-Research/snakecharm") // url to compare commits beetween previous and current release
//sectionUrlBuilder.set(ChangelogSectionUrlBuilder { repositoryUrl, currentVersion, previousVersion, isUnreleased ->
// "${repositoryUrl}/compare/v${previousVersion}...v${version.get()}"
//})
repositoryUrl.set("https://github.com/JetBrains-Research/snakecharm") // url to compare commits beetween previous and current release

// default values:
// combinePreReleases.set(true) // default; Combines pre-releases (like 1.0.0-alpha, 1.0.0-beta.2) into the final release note when patching.
Expand Down Expand Up @@ -159,11 +159,21 @@ tasks {
}.joinToString("\n").run { markdownToHTML(this) })

// Get the latest available change notes from the changelog file
changeNotes.set(provider {
changelog.run {
getOrNull(properties("pluginVersion")) ?: getLatest()
}.toHTML()
})
changeNotes.set(
provider {
with(changelog) {
val log = try {
getUnreleased()
} catch (e: MissingVersionException) {
getOrNull(version.toString()) ?: getLatest()
}
renderItem(
log,
org.jetbrains.changelog.Changelog.OutputType.HTML,
)
}
},
)
}

runPluginVerifier {
Expand Down
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ pluginGroup = com.jetbrains.snakecharm
pluginName = snakecharm

# Version naming based on https://semver.org:
# * {pluginVersion}.{pluginBuildCounter}{pluginPreReleaseSuffix}
# * {pluginVersion}{pluginPreReleaseSuffix}
# * plugin version is YEAR.MAJOR.MINOR, where YEAR.MAJOR is a minimal compatible platform version, MINOR is version digit.
# * {pluginPreReleaseSuffix}: Use empty string [..=] for release, for eap: [..=-eap] or [..=-eap.2]
pluginVersion = 2023.1
pluginVersion = 2023.1.1
pluginPreReleaseSuffix=-eap
#pluginPreReleaseSuffix=

# Project build counter from CI. Can be overridden during build using `./gradlew -PbuildCounter=nnnn my_task_name`
pluginBuildCounter=SNAPSHOT

Expand Down

0 comments on commit 29a5d83

Please sign in to comment.