Skip to content
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

chore: remove flavor-related sanity checks #245

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions overrides.rb
Original file line number Diff line number Diff line change
@@ -1,41 +1,10 @@
Rock.flavors.finalize
wrong_branch = Rock.flavors.find_all_overriden_flavored_branches

wrong_branch = wrong_branch.find_all { |pkg| pkg.importer.branch != 'rock-rc' }
if !wrong_branch.empty?
pkgs = wrong_branch.map { |pkg| "#{pkg.name}(#{pkg.importer.branch})" }.join(", ")

Autoproj.warn ""
Autoproj.warn "the following packages are using a different branch than the current flavor"
Autoproj.warn "it is assumed that it is intentional"
Autoproj.warn " #{pkgs}"
end

Autoproj.env_add_path 'ROCK_BUNDLE_PATH', File.join(Autobuild.prefix, 'share', 'rock')
Autoproj.env_add_path 'ROCK_BUNDLE_PATH', File.join(Autoproj.root_dir, 'bundles')

require File.join(__dir__, 'rock', 'git_hook')
require File.join(__dir__, 'rock', 'cmake_build_type')
Autoproj.manifest.each_autobuild_package do |pkg|
case pkg.importer
when Autobuild::Git
if ENV['ROCK_DISABLE_CROSS_FLAVOR_CHECKS'] != '1'
# Finally, verify that when pkg A from flavor X depends on pkg B,
# then B needs to be available in flavor X as well
Rock.flavors.verify_cross_flavor_dependencies(pkg)
end

# Do the git hook setup in a separate setup block since we must do it
# post-import
pkg.post_import do
if pkg.importer.branch == "next" || pkg.importer.branch == "stable"
Rock.install_git_hook pkg, 'git_do_not_commit_hook', 'pre-commit'
pierrewillenbrockdfki marked this conversation as resolved.
Show resolved Hide resolved
else
Rock.remove_git_hook pkg, 'pre-commit'
end
end
end

# NOTE: do not use a case/when to dispatch the package types.
# Autobuild::Orogen is a subclass of Autobuild::CMake - and therefore needs
# to get through both ifs. It's not the case with Autobuild::Ruby, but I
Expand Down
8 changes: 0 additions & 8 deletions rock/git_do_not_commit_hook

This file was deleted.

21 changes: 0 additions & 21 deletions rock/git_hook.rb

This file was deleted.