-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
Integrity checking system #3159
Conversation
I don't know how to fix (or ignore?) the "undefined constant ROOT_PATH" issue phpstan is reporting |
I think phpstan itself is crashing. It does not say problems were found with the code, it says that it itself crashed with a link to create a bug report. That also explains why ignoring the line doesn't help. |
I really like this idea, and it would be cool to push it out eventually. |
The problem
Many user reported issues are caused by missing files, extra files, modified files, files from different Nameless versions, or corrupt in some other way.
The solution
Ship a checksums file with NamelessMC, so the integrity of files can be verified. Files that are expected to change or be edited (e.g. cache, uploads, custom templates and modules) are ignored.
Workflow
Run
php -f dev/scripts/generate_checksums.php
to generate the checksums file to be included in a releaseRun
php -f dev/scripts/verify_checksums.php
to verify checksums using the checksums file (after preparing the release, so removing directories likenode_modules
,.git
, etc.)Ideally StaffCP would also run this with a cache, and display a warning in the "Server compatibility" section if there are issues. I did not implement that for now.