Skip to content

Commit

Permalink
Plugin publication: fix the channel selector (#444)
Browse files Browse the repository at this point in the history
* Plugin publication: fix the channel selector

Before this patch, publisher was always using the channel corresponding
to the first number in the plugin version for release builds. This is
because by default, Kotlin's substringAfter will return the whole input
string if it's unable to find the needle.

* Bump org.gradle.toolchains.foojay-resolver-convention

Bumps org.gradle.toolchains.foojay-resolver-convention from 0.7.0 to 0.8.0.

---
updated-dependencies:
- dependency-name: org.gradle.toolchains.foojay-resolver-convention
  dependency-type: direct:production
  update-type: version-update:semver-minor

* Release workflow: remove Java (#443)

* Release workflow: remove Java

It is not required in this workflow anyway.

* CHANGELOG.md update

---------

Co-authored-by: Jakub Chrzanowski <jakub.chrzanowski@jetbrains.com>

* CHANGELOG.md update

---------

Co-authored-by: KotlinIsland <65446343+kotlinisland@users.noreply.github.com>
Co-authored-by: Jakub Chrzanowski <jakub.chrzanowski@jetbrains.com>
  • Loading branch information
3 people authored Mar 8, 2024
1 parent c25c79d commit 2f824e0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/template-cleanup/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

rootProject.name = "%NAME%"
7 changes: 0 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,6 @@ jobs:
- name: Fetch Sources
uses: actions/checkout@v4

# Set up Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17

# Remove old release drafts by using the curl request for the available releases with a draft flag
- name: Remove Old Release Drafts
env:
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@

## [Unreleased]

### Changed

- Gradle - upgrade `org.gradle.toolchains.foojay-resolver-convention` to `0.8.0`

### Fixed

- Fixed calculation of the plugin publication channel

### Removed

- GitHub Actions: Remove the `Setup Java` step from the `releaseDraft` build step

## [1.12.0] - 2024-02-20

### Added
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@ tasks {
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
channels = properties("pluginVersion").map { listOf(it.substringAfter('-').substringBefore('.').ifEmpty { "default" }) }
channels = properties("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
}
}
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

rootProject.name = "IntelliJ Platform Plugin Template"

0 comments on commit 2f824e0

Please sign in to comment.