utilities/change_sponsor_logo.sh is supposed to preserve history: the old logo is kept as <sponsor>-before-<YYYYMMDD>, past events are repointed at it, and current/future events pick up the new logo automatically.
It selects which events to rewrite with:
EVENTS_TO_MODIFY=($(git ls-tree -r --name-only HEAD | xargs grep -E "$SPONSOR_REGEX" | grep -v 'before' | grep -v "^$(date +%Y)" | cut -d ':' -f 1))
grep -v "^$(date +%Y)" excludes only the current calendar year by path prefix. Because the data layout is data/events/<year>/<city>/main.yml, any event in a later year is not excluded and gets rewritten to the old logo.
In practice this means running the script in 2026 silently downgrades every 2027 event that lists the sponsor — exactly the events that should be showing the new logo.
Suggested fix: exclude the current year and everything after it, rather than string-matching a single year prefix.
Two smaller issues in the same script, worth folding into the fix:
- It enumerates via
git ls-tree HEAD, so an event whose data file is not yet committed is invisible to it.
grep -v 'before' filters on the whole path, so it would also skip an event whose path happened to contain the word "before".
Found while documenting the repo for AI coding assistants.
utilities/change_sponsor_logo.shis supposed to preserve history: the old logo is kept as<sponsor>-before-<YYYYMMDD>, past events are repointed at it, and current/future events pick up the new logo automatically.It selects which events to rewrite with:
EVENTS_TO_MODIFY=($(git ls-tree -r --name-only HEAD | xargs grep -E "$SPONSOR_REGEX" | grep -v 'before' | grep -v "^$(date +%Y)" | cut -d ':' -f 1))grep -v "^$(date +%Y)"excludes only the current calendar year by path prefix. Because the data layout isdata/events/<year>/<city>/main.yml, any event in a later year is not excluded and gets rewritten to the old logo.In practice this means running the script in 2026 silently downgrades every 2027 event that lists the sponsor — exactly the events that should be showing the new logo.
Suggested fix: exclude the current year and everything after it, rather than string-matching a single year prefix.
Two smaller issues in the same script, worth folding into the fix:
git ls-tree HEAD, so an event whose data file is not yet committed is invisible to it.grep -v 'before'filters on the whole path, so it would also skip an event whose path happened to contain the word "before".Found while documenting the repo for AI coding assistants.