-
Notifications
You must be signed in to change notification settings - Fork 11
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
Always copy PHP and legacy CLI files if they have changed #94
base: main
Are you sure you want to change the base?
Conversation
042e5b7
to
f19ce9d
Compare
@akalipetis this will conflict with the vendorization work - but I was playing with it anyway, to find an efficient way to check the files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main issues in here are:
- There's no need to include a new library (afero) for abstracting the filesystem, we can use
fs.FS
instead - The hash should be computed from the actual file, not from a file containing the hash value - this beats the purpose of checking hashes in the first place
1209f44
to
f0a1218
Compare
e16a11a
to
437f559
Compare
Re.
fs.FS is read only, and ideally we would test writing files, which afero would support. But, we could drop all of the testable FS stuff and just write real temporary files with |
8bef9a8
to
a8aa93c
Compare
a8aa93c
to
1294306
Compare
1294306
to
3bd3c31
Compare
3bd3c31
to
97b5258
Compare
This checks the existing PHP and legacy CLI files on every run, and re-copies them if necessary.
On Linux it compares the file content (chunk by chunk).
On Windows it compares against a known hash of the Zip file, and if that has changed, it unzips the file again. It also checks that hash during build against the remote sha256sum.txt file, to confirm that the
curl
download succeeded.Original description:
Saves static hashes for each file and checks their size / hash on each runSuggestion for #92