add support for explicitly specifying some artifacts to add#41
add support for explicitly specifying some artifacts to add#41doudou wants to merge 2 commits intoluislavena:masterfrom
Conversation
The 'rice' gem has bunch of files in ruby/lib that is not part of the gem proper - it is to be used by the libraries. It's obviously a misuse of the Rubygems system, but a useful one so far. This adds the --artifact PATH argument that allows to: - add a file explicitly - add a complete directory tree
|
Hello @doudou, thank you for your PR and providing the background of this request. I haven't looked into the code yet but planning this weekend. Will also try to correct the CI issues so is no longer showing incorrect errors. Thanks for your patience. Cheers. |
|
Hi Luis. Heads up that I'm already preparing a v2 version of this PR ... I never realized how powerful Dir.glob is, and am thinking of directly allowing passing globs instead of files. |
|
Updated ... |
|
|
||
| (@options[:artifacts] || []).map do |include, glob| | ||
| resolved = Dir.glob("#{target_dir}/#{glob}") | ||
| if include |
There was a problem hiding this comment.
Can I recommend any word other than include?
There was a problem hiding this comment.
Yeah. Missed that one. to_include ? to_be_included ? Or I could make it a mode variable that is either :include or :exclude. What do you think ?
|
Hello @doudou, thanks for your patience. Been looking at this change over the holidays and this might clash or could be refactor so Will work on this over the holidays and submit an alternate version. Cheers. |
|
Hello @doudou, thanks for your patience. I was working on a different approach on this and wanted to check with you the exclude pattern functionality. From this PR, you're removing files from Should include and exclude patterns be applied to the final list of files and not just the collected artifacts? I'm seeing an scenario for this like the following: Let me know your thoughts. Cheers. |
I don't see a problem with that. |
|
Excellent @doudou, wanted to confirm since your current PR applies this to collected artifacts and not all the files in the gemspec. Will submit an alternative version in the upcoming days to address this. Thank you for your patience and responses. Cheers. |
The 'rice' gem has bunch of files in ruby/lib that is not part
of the gem proper - it is to be used by the libraries. It's
obviously a misuse of the Rubygems system, but a useful one
so far.
This adds the --artifact PATH argument that allows to: