Updated mods updater script to correctly process mod releases#557
Updated mods updater script to correctly process mod releases#557fank merged 1 commit intofactoriotools:masterfrom
Conversation
fank
left a comment
There was a problem hiding this comment.
Thanks for this improvement! The enhanced version compatibility checking and dependency resolution logic look solid.
✅ Key improvements:
- Proper major/minor version comparison instead of simple string matching
- Checks optional dependencies (especially
base) to ensure compatibility - Processes releases chronologically to find the best compatible version
- Better error handling that doesn't stop processing all mods on single failure
✅ Code quality:
- Input validation is properly handled
- No security issues found (no command injection risks)
- Safe file operations maintained
The limitation mentioned about cross-major version compatibility (0.18 → 1.0) is reasonable and well-documented.
LGTM! 🚀
|
Unfortunately, the check still doesn't work perfectly. However, with auto-updates enabled, the container downloads version 11.3.0 for Factorio 2.0. It would be great if this could be fixed, if possible. |
|
@serjevski coulkd you please share the logs, of what is happening. |
|
Just tried running the update with this modlist file Logs are File downloaded is I am kindly asking you to do |
The script should correctly process mod releases
The updated script goes through each version reverse sorted by release date, then performs some checks.
If the check fails, it continues to the next release until the correct release found. The logic is the same for the case, if no release was found.
First, it checks Factorio version vs mod Factorio version.
If Major version differs, it skips it.
If Minor version is less, also skips.
Then it goes through the optional dependencies element and checks it with game version, for
basedependencies.If the dependency rule is false, it skips it.
Checked script on my own modpack, and the
jetpackmod was downgraded to the correct version for 2.0.21, everything else updated correctly. DLC mods also were ignored because they are for version 1.1Disclaimer:
I am not proficient with bash scripting, so I made the changes with the help of ChatGPT.
Also, I haven't added any advanced logic to the main mod Factiorio version check.
So the updater won't correctly update mods for this case, leaving old versions: