-
Notifications
You must be signed in to change notification settings - Fork 23
Update remarkable-update-image and remarkable-update-fuse versions #147
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
Conversation
WalkthroughAdd portable SHA-256 verifier in the Makefile by detecting platform and setting a Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Makefile
participant Shell as /bin/sh
participant SHA as SHA256SUM
rect rgba(230,247,255,0.6)
Makefile->>Shell: invoke test / test-executable
Shell->>Makefile: evaluate UNAME_S
Makefile->>SHA: set SHA256SUM (gsha256sum on Darwin, else sha256sum)
Makefile->>Shell: run $(SHA256SUM) -c file.sha256
alt verifier present and check succeeds
SHA-->>Shell: 0 (success)
Shell-->>Makefile: continue
else verifier present and check fails
SHA-->>Shell: non-zero (fail)
Shell-->>Makefile: stop / fail target
else verifier missing
Shell-->>Makefile: error and exit 1
end
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
Makefile (1)
60-67: Code duplication: extract hash verification logic into a variable.The same 8-line hash verification block appears in both
test(lines 60–67) andtest-executable(lines 83–90) targets. Consider defining a Makefile variable to eliminate duplication and simplify maintenance.Define a variable at the top of the Makefile:
CHECK_IMG_SHA := if command -v sha256sum >/dev/null 2>&1; then \ echo "$${IMG_SHA} .venv/$${FW_VERSION}_reMarkable2-$${FW_DATA}.img" | sha256sum --check; \ elif command -v shasum >/dev/null 2>&1; then \ echo "$${IMG_SHA} .venv/$${FW_VERSION}_reMarkable2-$${FW_DATA}.img" | shasum -a 256 --check; \ else \ echo "Error: Neither sha256sum nor shasum is available."; \ exit 1; \ fiThen replace each occurrence with:
$(CHECK_IMG_SHA); \Note: Escape
$as$$in variable definitions to preserve shell variable references.Also applies to: 83-90
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Makefile(2 hunks)requirements.txt(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Build for ubuntu-latest
- GitHub Check: Build for remarkable
- GitHub Check: Build for windows-latest
🔇 Additional comments (2)
requirements.txt (1)
3-4: Platform-specific dependency versions updated correctly.The version bumps for remarkable-update-image and remarkable-update-fuse maintain the platform-specific conditions and follow the expected format.
Makefile (1)
60-67: Hash verification logic verified; cross-platform fallback is compatible.The
shasum -a 256 --checkcommand accepts the same checksum file format assha256sum --check, confirming that this portable fallback implementation works correctly across platforms.
Summary by CodeRabbit