-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add ability to show files per build and whitelisting #264
base: master
Are you sure you want to change the base?
Conversation
for (int i = 0; i < items.size(); i++) { | ||
json_items[i]["product_id"] = items[i].product_id; | ||
json_items[i]["path"] = items[i].path; | ||
json_items[i]["size"] = static_cast<unsigned int>(items[i].totalSizeUncompressed); |
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.
Is unsigned int big enough?
Perhaps std::uintmax_t would be better.
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.
yeah, it is an std::uintmax_t internally — but for some reason, Json::Value has multiple overloads for the type, so I was forced to cast it
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.
I also wanted to use a size_t
for the loop itself, but it freaks out because their indexing operator seems to be overidded on multiple sizes or something
This PR expanded in scope as I added whitelisting capabilities, which I need for my use-case. More than happy to split up into another PR if desired. |
Adds the ability to show the files associated with a build in stdout. Useful for doing any pre-processing via
jq
before actually downloading the build.Additionally adds a whitelisting capability. It uses the exact same logic as
Blacklist
(which has been renamed toFilelist
to represent that it's more generic, but the same logic). I made it so that the whitelist takes precedent over the blacklist, but this can be changed as desired.