regaw-leinad / homebridge-winix-purifiers

Homebridge plugin for Winix air purifiers
https://www.npmjs.com/package/homebridge-winix-purifiers
Apache License 2.0
15 stars 1 forks source link

Can a changelog be shown before plugin update in homebridge config UI? #14

Closed jonnyborbs closed 8 months ago

jonnyborbs commented 8 months ago

I don't have a pending update to prove it, but I feel like I've seen some other plugins show me a summary of the changes/changelog in the plugin before proceeding with an update once detected. Is that something optional that's just not in this one, or am I imagining it?

If it is possible, I'd sure love to see it - I was stoked to see you had another new version out, but I had to go dig deep (well, I've starred this repo, so not that deep) to find what changed :)

regaw-leinad commented 8 months ago

I was literally just thinking the same thing when I updated yesterday... it pulls the change from the GitHub release notes, and they do exist. There used to be release notes for my updates, but I can't pin down when I remembered them stopping - I figured the homebridge ui made an update or something. Will look into the UI code and try to figure out what's going on.

DMBlakeley commented 8 months ago

You need to add a CHANGELOG.md file to your release structure. Reference this guide.

regaw-leinad commented 8 months ago

You need to add a CHANGELOG.md file to your release structure. Reference this guide.

This pending update notes behavior seemed to have changed a while ago - it should be pulling from the Github releases to show the pending update notes. I may add a CHANGELOG.md to display update notes after the user installs the plugin update, but as far as "Hey there's an update available - here are the notes", that is handled by getting the Github release notes.

https://github.com/homebridge/homebridge-config-ui-x/issues/51#issuecomment-492660224 https://github.com/homebridge/verified/issues/648#issuecomment-1870580538

https://github.com/homebridge/homebridge-config-ui-x/blob/bae31e4feefa6684e38e3dd4063bbc0b678d3885/src/modules/plugins/plugins.service.ts#L877-L948

specifically https://github.com/homebridge/homebridge-config-ui-x/blob/bae31e4feefa6684e38e3dd4063bbc0b678d3885/src/modules/plugins/plugins.service.ts#L940-L944

going to look into it for a bit this week why it's no longer pulling my release notes

regaw-leinad commented 8 months ago

Found the issue and submitted a PR: https://github.com/homebridge/homebridge-config-ui-x/pull/2013

was introduced in https://github.com/homebridge/homebridge-config-ui-x/pull/1890 https://github.com/homebridge/homebridge-config-ui-x/commit/a93fbc13d1df801a62ba8d5d0c68a9836bff936f

jonnyborbs commented 8 months ago

Hah! Nice catch. Hope they pick it up. Thanks!

regaw-leinad commented 8 months ago

closing this out for now - will ping this thread when it gets merged in over there

regaw-leinad commented 8 months ago

https://github.com/homebridge/homebridge-config-ui-x/pull/2013#issuecomment-1958006206

If you're running the beta config UI, it will be out shortly - otherwise it'll be released in the next config ui x update

DMBlakeley commented 8 months ago

Thanks for this additional clarification. I have had my own homebridge plug-in but did not fully understand how this worked. Thought it was just the CHANGELOG.md file.

regaw-leinad commented 8 months ago

Thanks for this additional clarification. I have had my own homebridge plug-in but did not fully understand how this worked. Thought it was just the CHANGELOG.md file.

Nice! no wonder you knew exactly what was wrong with the ambient light level sensor output in https://github.com/regaw-leinad/homebridge-winix-purifiers/issues/11

I actually didn't fully understand the CHANGELOG.md part until you described it above, so I'm glad we were able to share knowledge on the release notes!