Skip to content

Commit

Permalink
chore: update guidelines, plugin and change notes generation (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
arhont375 authored Aug 12, 2024
1 parent f935e28 commit d18eaed
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install markdown tool and generate change notes
run: |
sudo apt-get update
sudo apt-get install markdown
echo "CHANGE_NOTES=$(gh release view --json body --template "{{.body}}" $GITHUB_REF_NAME | markdown)" >> "$GITHUB_ENV"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK
uses: actions/setup-java@v3
with:
Expand Down
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@ IDEA marketplace: https://plugins.jetbrains.com/plugin/19912-thrift-support-fork
Continuation of [original plugin](https://github.com/fkorotkov/intellij-thrift) with main focus on IDEA compatibility
updates. Feel free to open PR for any new feature or update of functionality.

## How to build
## Contribution

### How to build

[JDK 21 or later](https://adoptium.net/) is required to build from source.

```bash
./gradlew :thrift:buildPlugin
```

## How to run locally with new changes
### How to test locally with new changes

```bash
./gradlew :thrift:runIde
```

## Development
### Development

- General [docs](https://plugins.jetbrains.com/docs/intellij/welcome.html) about plugin development
- Thrift grammar generated from the [BNF grammar](./thrift/src/main/grammar/Thrift.bnf) using
Expand All @@ -35,3 +37,18 @@ the [Grammar-Kit](https://github.com/JetBrains/Grammar-Kit) IDEA plugin.
```bash
./gradlew :thrift:test
```

### Update for the next IDEA version

Generally the flow of updates is following:
1. Update [IDEA platform plugin](https://github.com/JetBrains/intellij-platform-gradle-plugin/releases) to the latest
version and resolve related deprecations, see `ideaPlatformPluginVersion`
in the [`gradle.properties`](gradle.properties);
1. Reference [IDEA vesrions](https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html#platformVersions)
to find latest `Branch Number` to be used as the `ideaSinceVersion` and related `IntelliJ Platform Version`
to be used as the `ideaVersion` in the [`gradle.properties`](gradle.properties);
1. Try to run tests and build the plugin for local test. If all fine it's good to submit PR.

### Other improvements and features

Feel free to open PR for any desired feature.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ideaSinceVersion=242

junitVersion=5.9.2

ideaPlatformPluginVersion=2.0.0
ideaPlatformPluginVersion=2.0.1
5 changes: 2 additions & 3 deletions thrift/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ dependencies {

intellijPlatform {
val gitTag = System.getenv()["GITHUB_REF_NAME"] ?: ""
val resolvedChangeNotes = System.getenv()["CHANGE_NOTES"] ?: ""

publishing {
token = System.getenv()["JETBRAINS_TOKEN"] ?: ""
Expand All @@ -64,9 +65,7 @@ intellijPlatform {
pluginConfiguration {
version = gitTag
id = "thrift-syntax-fork"
changeNotes = """
2024.2 EAP support
""".trimIndent()
changeNotes = resolvedChangeNotes

ideaVersion {
sinceBuild = project.property("ideaSinceVersion") as String
Expand Down

0 comments on commit d18eaed

Please sign in to comment.