From f0022e499d555714f576071243340ea233cd3e7d Mon Sep 17 00:00:00 2001 From: Julien Bourdeau Date: Tue, 27 Feb 2024 09:51:46 +0100 Subject: [PATCH] Better changelog automation --- bootstrap.php | 12 ++++++++---- source/changelog.blade.md | 32 ++------------------------------ 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index 00356be..eb8a1ba 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -30,10 +30,10 @@ extends: _layouts.changelog section: content slug: changelog -title: Installation -subtitle: "Setup the Debugbar dev tools in your project" -seo_title: -seo_description: +title: Changelog +subtitle: "What's new in Debugbar?" +seo_title: "Rails Debugbar Changelog" +seo_description: "All new features, improvements and fixes in Debugbar and more importantly: all the breaking changes!" --- TEXT; @@ -42,6 +42,10 @@ File::put(__DIR__.'/source/changelog.blade.md', $content); }); +$events->afterBuild(function (Jigsaw $jigsaw) { + exec('git checkout -- '.__DIR__.'/source/changelog.blade.md'); +}); + $events->beforeBuild(function (Jigsaw $jigsaw) { $manifest = json_decode(file_get_contents(__DIR__.'/source/assets/debugbar/manifest.json'), true); diff --git a/source/changelog.blade.md b/source/changelog.blade.md index 7502316..56dc9c6 100644 --- a/source/changelog.blade.md +++ b/source/changelog.blade.md @@ -1,30 +1,2 @@ ---- -extends: _layouts.changelog -section: content -slug: changelog -title: Installation -subtitle: "Setup the Debugbar dev tools in your project" -seo_title: -seo_description: ---- - -## v0.2.0 - Unreleased - -* Introduce polling in case someone cannot use ActiveCable - See [8b262be7](https://github.com/julienbourdeau/debugbar/commit/8b262be7b644c7b587a6c3348bb02076053a344f) - * https://debugbar.dev/docs/polling-mode -* Move main middleware higher in the chain - See [7ca51c10](https://github.com/julienbourdeau/debugbar/commit/7ca51c10c5999f7ad14a303c92083614551de134) -* Silence debugbar routes for quieter logs - See [efe491bd](https://github.com/julienbourdeau/debugbar/commit/efe491bde9e0544e5fb891597bb2af47854c1169) - -### Breaking changes - -The frontend configuration was slightly modified. If you customized the prefix for the debugbar routes or the channelName, you must update your config. -Prefix is at the root, and channelName is nested under the cable key. - -```diff -- <%= debugbar_javascript channelName: "something_else", cable: {prefix: "custom-prefix"} %> -+ <%= debugbar_javascript prefix: "custom-prefix", cable: {channelName: "something_else"} %> -``` - -## v0.1.0 - 2024-02-13 - -* Initial release 🎉 +This file generated before Build by pulling the changelog from GitHub. +Checkout bootstrap.php for the implementation.