Skip to content

Commit

Permalink
Various fixes and version 0.8.0 (#96)
Browse files Browse the repository at this point in the history
* Various fixes and version 8.0

* git ignore.

* Cleanup

* Fix

* workflows

* Apply suggestions from code review

* More build updates.

* Drop platform version

* Apply suggestions from code review

* Final tweak

* Speed up verification

* git ignore.
  • Loading branch information
ryan-rushton authored Dec 5, 2024
1 parent 0a08d52 commit 7f5e528
Show file tree
Hide file tree
Showing 13 changed files with 162 additions and 185 deletions.
50 changes: 18 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ on:
# Trigger the workflow on any pull request
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:

# Prepare environment and build the plugin
build:
name: Build
Expand All @@ -29,13 +34,14 @@ jobs:
changelog: ${{ steps.properties.outputs.changelog }}
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
steps:
# Check out current repository

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v3
uses: gradle/actions/wrapper-validation@v3

# Set up Java environment for the next steps
- name: Setup Java
Expand All @@ -46,9 +52,7 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4

# Set environment variables
- name: Export Properties
Expand All @@ -59,16 +63,12 @@ jobs:
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
echo "properties=PROPERTIES" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
# Build plugin
- name: Build plugin
run: ./gradlew buildPlugin
Expand Down Expand Up @@ -97,7 +97,8 @@ jobs:
needs: [ build ]
runs-on: ubuntu-latest
steps:
# Check out current repository

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

Expand All @@ -110,9 +111,7 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4

# Run tests
- name: Run Tests
Expand All @@ -126,26 +125,21 @@ jobs:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests

# Upload the Kover report to CodeCov
- name: Upload Code Coverage Report
uses: codecov/codecov-action@v4
with:
files: ${{ github.workspace }}/build/reports/kover/report.xml

# Run plugin structure verification along with IntelliJ Plugin Verifier
verify:
name: Verify plugin
needs: [ build ]
runs-on: ubuntu-latest
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
large-packages: false

# Check out current repository
# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

Expand All @@ -158,9 +152,7 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4

# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
Expand All @@ -171,7 +163,7 @@ jobs:

# Run Verify Plugin task and IntelliJ Plugin Verifier tool
- name: Run Plugin Verification tasks
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}

# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
Expand All @@ -191,17 +183,11 @@ jobs:
permissions:
contents: write
steps:
# Check out current repository

# Check out the current repository
- 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
16 changes: 7 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# GitHub Actions Workflow created for handling the release process based on the draft release prepared with the Build workflow.
# Running the publishPlugin task requires the PUBLISH_TOKEN secret provided.
# Running the publishPlugin task requires all following secrets to be provided: PUBLISH_TOKEN, PRIVATE_KEY, PRIVATE_KEY_PASSWORD, CERTIFICATE_CHAIN.
# See https://plugins.jetbrains.com/docs/intellij/plugin-signing.html for more information.

name: Release
on:
release:
types: [prereleased, released]
types: [ prereleased, released ]

jobs:

# Prepare and publish the plugin to JetBrains Marketplace repository
release:
name: Publish Plugin
Expand All @@ -16,7 +17,8 @@ jobs:
contents: write
pull-requests: write
steps:
# Check out current repository

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4
with:
Expand All @@ -31,9 +33,7 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4

# Set environment variables
- name: Export Properties
Expand All @@ -44,12 +44,11 @@ jobs:
${{ github.event.release.body }}
EOM
)"
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# Update Unreleased section with the current release note
# Update the Unreleased section with the current release note
- name: Patch Changelog
if: ${{ steps.properties.outputs.changelog != '' }}
env:
Expand Down Expand Up @@ -85,7 +84,6 @@ jobs:
git checkout -b $BRANCH
git commit -am "Changelog update - $VERSION"
git push --set-upstream origin $BRANCH
gh label create "$LABEL" \
--description "Pull requests with release changelog update" \
--force \
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.intellijPlatform
.gradle
.kotlin
.idea
build
**/.DS_Store
21 changes: 15 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

## [Unreleased]

- Removed json validation of config file
- Set minimum versions to 2024
- Updated to newer build tooling

## 0.7.0 - 2024-07-20

- Fixed an issue where initialisation could get into an infinite loop.
Expand All @@ -23,8 +27,9 @@

- Add check for dead processes to warn users that the dprint daemon is not responding
- Increase severity of logging in the event processes die or errors are seen in process communication
- This may be a little noisy, and if so disabling the plugin is recommended unless the underlying issue with the process can be fixed
- For intermittent or one off errors, just restart the dprint plugin via the `Restart dprint` action
- This may be a little noisy, and if so disabling the plugin is recommended unless the underlying issue with the
process can be fixed
- For intermittent or one off errors, just restart the dprint plugin via the `Restart dprint` action
- Upgrade dependencies
- Attempt to fix changelog update on publish

Expand Down Expand Up @@ -68,7 +73,8 @@

## 0.3.6

- Fix issue where using the IntelliJ formatter would result in a no-op on every second format, IntelliJ is reporting larger formatting ranges that content length and dprint would not format these files
- Fix issue where using the IntelliJ formatter would result in a no-op on every second format, IntelliJ is reporting
larger formatting ranges that content length and dprint would not format these files
- Better handling of virtual files
- Silence an error that is thrown when restarting dprint
- Improve verbose logging in the console
Expand All @@ -82,7 +88,8 @@

- Reduce timeout when checking if a file can be formatted in the external formatter
- Cache whether files can be formatted by dprint and create an action to clear this
- Remove custom synchronization and move to an IntelliJ background task queue for dprint tasks (this appears to solve the hard to reproduce lock up issues)
- Remove custom synchronization and move to an IntelliJ background task queue for dprint tasks (this appears to solve
the hard to reproduce lock up issues)

## 0.3.3

Expand All @@ -101,8 +108,10 @@

- Introduced support for v5 of the dprint schema
- Added a dprint tool window to provide better output of the formatting process
- Added the `Restart Dprint` action so the underlying editor service can be restarted without needed to go to preferences
- Removed the default key command of `cmd/ctrl+shift+option+D`, it clashed with too many other key commands. Users can still map this manually should they want it.
- Added the `Restart Dprint` action so the underlying editor service can be restarted without needed to go to
preferences
- Removed the default key command of `cmd/ctrl+shift+option+D`, it clashed with too many other key commands. Users can
still map this manually should they want it.

## 0.2.3

Expand Down
Loading

0 comments on commit 7f5e528

Please sign in to comment.