Skip to content

Commit

Permalink
Optimize .gitignore: Use root-relative paths to avoid unintended ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
MalekKamel committed Oct 26, 2024
1 parent d6f8584 commit ae041fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions solara/lib/core/scripts/gitignore_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ def self.ignore_common_files
]

if Platform.is_flutter || Platform.is_ios
items << FileManager.get_relative_path_to_root(FilePath.project_infoplist_string_catalog)
# The excluded InfoPlist.xcstrings maybe at the root. In this case we have to avoid ignoring the brands files.
items << '!solara/brand/brands/**/InfoPlist.xcstrings'
items << "/#{FileManager.get_relative_path_to_root(FilePath.project_infoplist_string_catalog)}"
end

GitignoreManager.new(FilePath.project_root).add_items(items)
Expand Down
2 changes: 1 addition & 1 deletion solara/lib/core/scripts/resource_manifest_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def destinations_of_directory_contents(src_dir, dst_dir)

def git_ignore(files)
files.each do |file|
GitignoreManager.new(FilePath.project_root).add_items([file])
GitignoreManager.new(FilePath.project_root).add_items(["/#{file}"])
end
end

Expand Down

0 comments on commit ae041fc

Please sign in to comment.