From 31d367d308639b4688de8908cff13e537bf49a5f Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Fri, 22 Jun 2018 20:47:14 +0900 Subject: [PATCH] Collapse looks for yaml files that start with "@" for specialCase --- .../hugo-collapse/.circleci/orbs/hugo/{orb.yml => @orb.yml} | 0 cmd/testdata/myorb/test/{orb.yml => @orb.yml} | 0 .../test/orbs/foo/{orb.yml => @orb.yml} | 0 .../test/orbs/foo/{orb.yml => @orb.yml} | 0 .../test/orbs/rails/{orb.yml => @orb.yml} | 0 filetree/filetree.go | 2 +- 6 files changed, 1 insertion(+), 1 deletion(-) rename cmd/testdata/hugo-collapse/.circleci/orbs/hugo/{orb.yml => @orb.yml} (100%) rename cmd/testdata/myorb/test/{orb.yml => @orb.yml} (100%) rename cmd/testdata/nested-orbs-and-local-commands-etc/test/orbs/foo/{orb.yml => @orb.yml} (100%) rename cmd/testdata/test-with-large-nested-rails-orb/test/orbs/foo/{orb.yml => @orb.yml} (100%) rename cmd/testdata/test-with-large-nested-rails-orb/test/orbs/rails/{orb.yml => @orb.yml} (100%) diff --git a/cmd/testdata/hugo-collapse/.circleci/orbs/hugo/orb.yml b/cmd/testdata/hugo-collapse/.circleci/orbs/hugo/@orb.yml similarity index 100% rename from cmd/testdata/hugo-collapse/.circleci/orbs/hugo/orb.yml rename to cmd/testdata/hugo-collapse/.circleci/orbs/hugo/@orb.yml diff --git a/cmd/testdata/myorb/test/orb.yml b/cmd/testdata/myorb/test/@orb.yml similarity index 100% rename from cmd/testdata/myorb/test/orb.yml rename to cmd/testdata/myorb/test/@orb.yml diff --git a/cmd/testdata/nested-orbs-and-local-commands-etc/test/orbs/foo/orb.yml b/cmd/testdata/nested-orbs-and-local-commands-etc/test/orbs/foo/@orb.yml similarity index 100% rename from cmd/testdata/nested-orbs-and-local-commands-etc/test/orbs/foo/orb.yml rename to cmd/testdata/nested-orbs-and-local-commands-etc/test/orbs/foo/@orb.yml diff --git a/cmd/testdata/test-with-large-nested-rails-orb/test/orbs/foo/orb.yml b/cmd/testdata/test-with-large-nested-rails-orb/test/orbs/foo/@orb.yml similarity index 100% rename from cmd/testdata/test-with-large-nested-rails-orb/test/orbs/foo/orb.yml rename to cmd/testdata/test-with-large-nested-rails-orb/test/orbs/foo/@orb.yml diff --git a/cmd/testdata/test-with-large-nested-rails-orb/test/orbs/rails/orb.yml b/cmd/testdata/test-with-large-nested-rails-orb/test/orbs/rails/@orb.yml similarity index 100% rename from cmd/testdata/test-with-large-nested-rails-orb/test/orbs/rails/orb.yml rename to cmd/testdata/test-with-large-nested-rails-orb/test/orbs/rails/@orb.yml diff --git a/filetree/filetree.go b/filetree/filetree.go index b1593e634..e18c91e02 100644 --- a/filetree/filetree.go +++ b/filetree/filetree.go @@ -60,7 +60,7 @@ func (n Node) rootFile() bool { } func (n Node) specialCase() bool { - re := regexp.MustCompile(`orb\.(yml|yaml)$`) + re := regexp.MustCompile(`^@.*\.(yml|yaml)$`) return re.MatchString(n.basename()) }