-
Notifications
You must be signed in to change notification settings - Fork 105
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
(PDK-1100) Exclude known artifacts from build instead of cleaning #575
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,16 @@ | |
module PDK | ||
module Module | ||
class Build | ||
DEFAULT_IGNORED = [ | ||
'/pkg/', | ||
'.*', | ||
'~*', | ||
'/coverage', | ||
'/checksums.json', | ||
'/REVISION', | ||
'/spec/fixtures/modules/', | ||
].freeze | ||
|
||
def self.invoke(options = {}) | ||
new(options).build | ||
end | ||
|
@@ -37,7 +47,6 @@ def package_file | |
# | ||
# @return [String] The path to the built package file. | ||
def build | ||
cleanup_module | ||
create_build_dir | ||
|
||
stage_module_in_build_dir | ||
|
@@ -83,17 +92,6 @@ def cleanup_build_dir | |
FileUtils.rm_rf(build_dir, secure: true) | ||
end | ||
|
||
# Clean up any files created during use of the PDK that shouldn't be part | ||
# of the built module (e.g. test fixtures). | ||
# | ||
# @return nil | ||
def cleanup_module | ||
PDK::Util::Bundler.ensure_bundle! | ||
PDK::Util::Bundler.ensure_binstubs!('rake') | ||
|
||
PDK::Test::Unit.tear_down | ||
end | ||
|
||
# Combine the module name and version into a Forge-compatible dash | ||
# separated string. | ||
# | ||
|
@@ -215,6 +213,8 @@ def ignored_files | |
ignored = ignored.add("\/#{File.basename(target_dir)}\/") | ||
end | ||
|
||
DEFAULT_IGNORED.each { |r| ignored.add(r) } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will add duplicate entries to the ignore list if there are common ignores between the pmt/pdk/git ignore files and the defaults. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicates shouldn't cause an issue (just as you can have duplicate entries in a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True, we don't currently clear dupes from the ignore file either. |
||
|
||
ignored | ||
end | ||
end | ||
|
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.
Does this need to re-appear somewhere?
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.
Nope, the purpose of this change is to remove the need for the in-module bundler environment when building release tarballs