-
Notifications
You must be signed in to change notification settings - Fork 45
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
feat: initial build of github releases support #164
Conversation
Codecov Report
@@ Coverage Diff @@
## main #164 +/- ##
==========================================
- Coverage 46.07% 44.66% -1.42%
==========================================
Files 69 70 +1
Lines 2179 2248 +69
==========================================
Hits 1004 1004
- Misses 1175 1244 +69
Continue to review full report at Codecov.
|
src/actions/binary/github.rs
Outdated
Step { | ||
atom: Box::new(Chmod { | ||
path: PathBuf::from(format!("{}/{}", &self.directory, &self.name)), | ||
mode: 0o755, |
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.
Maybe a mode
should be chosen which restricts it to the owner, who runs comtrya
.
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.
One comment and some clippy
warnings.
BSD users have a tendency to be a little more strict to sticking to the prescribed hierarchy of files. Best way to get a feel for it is to read the man pages for hier. On NetBSD, I don't think I've ever set up a |
d5a5e7d
to
4dcc241
Compare
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.
Looks good on my end. I do have one comment regarding checking os_info::Bitness. It is reasonable to assume that any machine that doesn't return Bitness:X32 would be 64-bit. But there are some linux distros that os_info will report back wrongly and we can get a different Bitness or just Bitness::Unknown. I doubt we will be getting a Bitness::Unknown from someone running comtrya on their hacked commodore running linux.
If you think adding a branch for this is unnecessary, your good to merge on my end.
I'll add my review later |
Should we add a checksum check? actions:
- action: binary.github
name: comtrya
directory: /tmp
repository: comtrya/comtrya
checksum_file: comtrya.sha512 This would be optional. If As we autodetect the architecture, the filename might not work and we should add the expected checksum. |
This really needs some integration tests, so I'm going to take a look at something @icepuma shared recently:
https://github.com/aelsabbahy/goss
I'm also not super keen on
directory: /usr/local/bin
being mandatory and I think we can be smarter about this by peeking into${PATH}
for a XDG/bin
directory or/usr/local
when missing. Curious what BSD users would expect here too, cc @kraileth and @martintcThough this PR is available for testing
Closes #24