grinco / ote_rate

Home Assistant Sensor Component that tracks electricity cost based on the OTE wholesale price
21 stars 17 forks source link

custom_components.hacs.exceptions.HacsException: No manifest.json file found '/manifest.json' #16

Open grinco opened 7 months ago

grinco commented 7 months ago

I can't wrap my head around why hacs keeps complaining that manifest.json is missing. @yardee did you have any similar issues when you changed the directory structure?

Also there are a few things on the todo: fix github actions, especially the build and upload zip file process. I have no experience with it so it might take a little while before I figure it out.

grinco commented 7 months ago

https://github.com/grinco/ote_rate/releases/tag/v0.2.2 is marked as beta for now until update is fixed.

grinco commented 7 months ago

Looks like it has something to do with hacs caching. If I set v0.2.2 as latest, remove repository and re-add it hacs - it's updating just fine. I'll try to downgrade and update again. If it works - will resolve this one.

grinco commented 7 months ago

Yup, I was able to validate the suspected behavior by downgrading to https://github.com/grinco/ote_rate/releases/tag/v0.2.0 and back to v.0.2.2.

TL;DR: looks like HACS doesn't handle well changing "content_in_root" between releases. To work around it one must remove the repository from HACS and re-add, or install the update manually. I'll collect all necessary logs and report a bug against HACS.

yardee commented 7 months ago

I have no issues with upgrading to new structure, but it might be just thanks to I had to change the respository to my fork anyway. Build action looks good now right?

grinco commented 7 months ago

For some reason it's not triggered. See, I have just published https://github.com/grinco/ote_rate/releases/tag/v0.2.3 and the build workflow didn't trigger. I'll give it a try on a dummy repo and will fix when I have time. For now I've updated the ZIP manually and attached to the release.

grinco commented 7 months ago

Found the issue with the build process. It only works when the release is published using the CLI.

yardee commented 7 months ago

Thats strange, I have tried it on my fork and it triggered successfully: https://github.com/yardee/ote_rate/actions/workflows/build.yaml (just needed to set rights to write)

yardee commented 7 months ago

Also I found out checks on pull requests are not triggered. Like here https://github.com/yardee/ote_rate/pull/9/checks https://github.com/yardee/ote_rate/actions/workflows/pull.yml

yardee commented 7 months ago

I think I have just setup Branch protection rules in the repository settings

grinco commented 7 months ago

It's because your pull request introduced the actions - it didn't exist in the repo before. It works now. Here's an example: https://github.com/grinco/ote_rate/actions/runs/7604215259 https://github.com/grinco/ote_rate/pull/18/checks

yardee commented 7 months ago

Sure, I ment on this PR, where were pull request actions already merged. But it doesn't matter, it is working now. Thanks