simonw / til

Today I Learned
https://til.simonwillison.net
Apache License 2.0
1.02k stars 81 forks source link

Renaming a page breaks the build #24

Closed simonw closed 3 years ago

simonw commented 3 years ago

The rename in b9f613dd7386cdcc7ab97e6734acf86a0c42cad6 broke things: https://github.com/simonw/til/runs/1059759359?check_suite_focus=true

Traceback (most recent call last):
Rendered HTML for github/dependencies-graphql-api.md
  File "build_database.py", line 98, in <module>
    build_database(root)
Rendered HTML for bash/loop-over-csv.md
  File "build_database.py", line 90, in build_database
Rendered HTML for readthedocs/custom-subdomain.md
    record.update(all_times[path])
Rendered HTML for readthedocs/readthedocs-search-api.md
KeyError: 'cloudrun/gcloud-run-services-list.md'

It looks like the all_times = created_changed_times(repo_path) function can't handle files that were renamed.

simonw commented 3 years ago

For the moment I'm going to remove the file in one commit then add it again in a second commit.

simonw commented 3 years ago

I am going to try to remember not to rename pages.