Skip to content

Fix buildinfo.json pollution by only keeping latest versions #579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 12, 2025

Conversation

Fank
Copy link
Member

@Fank Fank commented Jul 12, 2025

Summary

  • Modified update.sh to rebuild buildinfo.json from scratch instead of accumulating versions
  • Cleaned up buildinfo.json to only contain the current stable (2.0.55) and experimental (2.0.60) versions
  • Fixed bash compatibility issue with associative arrays

Problem

The update.sh script was designed to incrementally update buildinfo.json by adding new versions and updating tags, but it never removed old versions. This led to the file growing indefinitely with every historical version.

Solution

Changed the update logic to:

  1. Create a fresh buildinfo.json from scratch each time
  2. Only include the current stable and experimental versions from the Factorio API
  3. Preserve all the proper tags and structure

Test plan

  • Run ./update.sh locally to verify it generates correct buildinfo.json
  • Verify the script exits early when versions haven't changed
  • Ensure all tags are properly set (stable, latest, version numbers, etc.)
  • Test with GitHub Actions to ensure automated updates work correctly

🤖 Generated with Claude Code

Previously, update.sh would accumulate all historical versions in buildinfo.json,
leading to an ever-growing file. This change modifies the script to rebuild
buildinfo.json from scratch with only the current stable and experimental versions.

Changes:
- Replace incremental update logic with complete rebuild
- Create fresh buildinfo.json containing only latest versions
- Preserve all proper tags (stable, latest, version numbers, etc.)
- Fix bash compatibility issue with associative arrays

This ensures buildinfo.json remains clean and only contains the versions
currently being built and published.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
$/${} is unnecessary on arithmetic variables. SC2004

tag_versions[$tag]="$version"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
$/${} is unnecessary on arithmetic variables. SC2004

tag_versions[$tag]="$version"

@Fank Fank merged commit 5337894 into master Jul 12, 2025
2 checks passed
@Fank Fank deleted the fix-buildinfo-pollution branch July 12, 2025 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant