Powerwall-Dashboard: Repo cleanup.. remove ignored files, update ignore list

this is an offer for me to help, I’m looking for confirmation & maybe some guidance

Problem

I’m seeing a number of changes in my local git gui which could be prevented with some cleanup.

Enhancement

  • There are some .DS_Store files in the repo which are ignored & show as diffs
  • it looks like there are some database files in the repo which need cleanup
  • adding some well placed .keep files can ensure folders are in place upon git checkout
  • I see some changes in the backup script I’d submit in a separate PR once this is done.

Additional context

I’ve been running cross platform dev teams for a while. Not everyone knows about a .gitattributes file or .editorconfig. I’m not super familiar with how to help the actionable code, but I can sure clean up a repo. 😄

I plan on opening a PR with changes soon, I’ll have some questions about how best stuff should work.

My local diff in the moment:

2023-05-02_10-12-57

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 29 (20 by maintainers)

Most upvoted comments

Yes, ./upgrade.sh made an update from 2.9.7 to 2.9.7 and completed without errors. Also, ./verify.shshows that everything is working as expected. Thanks a lot to both of you!

I started putting my thoughts separate issues:

I imagine we can close this issue once it goes a while without addition related issues like @jaydkay pointed out.

@YesThatAllen should we add anything to upgrade.sh to accommodate for the repo changes?

The change in 2.9.7 which removed .keep from backups/ should be enough to prevent anyone else running in to this issue.

Other changes to the upgrade & backup scripts are fodder for separate issues.

Yep, the script had failed on the git pull --rebase. You’ve done that now so the upgrade script should work as expected.

Any idea what might be causing this (the last upgrades never failed)? Some files in ~/Powerwall-Dashboard/influxdb belong to the user root,

Yep influxdb/backups/ was created by root, so the update script can’t create a file in it.

but as far as I understood, I’m not supposed to run ./upgrade as root:

Correct. there are a number of ways we might handle this, but the simplest fix for now is to not attempt to create that .keep file. I’ve submitted a fix in #272

The tz.sh script updates all those files to have your timezone and is run during setup.sh. The updated.sh uses tz.sh to reset to default (yes, America/Los_Angeles) and then does a git pull and runs tz.sh again to set it back to your local timezone as stored in the local (untracked) tz file.

Yes, it is a hack, but the timezone localization required in all those files didn’t allow for an external reference.

Hi @YesThatAllen - I would love a PR for this! Thank for your help. 🙏