diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1b35cec..6bd3c62 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @hashicorp/release-engineering +* @hashicorp/team-productivity-systems-and-services \ No newline at end of file diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index af186f7..818591c 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -21,8 +21,9 @@ jobs: go-version-file: '.go-version' - name: Run GoReleaser - uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 + uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 with: + distribution: goreleaser version: latest args: release --clean env: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 04ab154..d1b79aa 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,6 +1,6 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 - +version: 2 before: hooks: - go mod tidy @@ -49,6 +49,6 @@ brews: homepage: 'https://github.com/hashicorp/copywrite' description: 'copywrite -- utilities for managing copyright headers and license files for GitHub repos' license: 'MPL-2.0' - folder: Formula + directory: Formula test: | system "#{bin}/copywrite --version" diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index dcb4253..0000000 --- a/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @hashicorp/engineering-systems diff --git a/META.d/_summary.yaml b/META.d/_summary.yaml new file mode 100644 index 0000000..cf91052 --- /dev/null +++ b/META.d/_summary.yaml @@ -0,0 +1,7 @@ +schema: 1.1 +category: service +summary: + owner: team-productivity-systems-and-services + description: | + Utility for managing copyright headers and license files across repos + visibility: external diff --git a/README.md b/README.md index 539a33c..fd0566e 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ freely in later steps. ```yaml - name: Setup Copywrite - uses: uses: hashicorp/setup-copywrite@3ace06ad72e6ec679ea8572457b17dbc3960b8ce # v1.0.0 + uses: hashicorp/setup-copywrite@867a1a2a064a0626db322392806428f7dc59cb3e # v1.1.2 - name: Check Header Compliance run: copywrite headers --plan diff --git a/addlicense/main.go b/addlicense/main.go index 0522dcd..68c291c 100644 --- a/addlicense/main.go +++ b/addlicense/main.go @@ -32,7 +32,7 @@ import ( "text/template" "time" - doublestar "github.com/bmatcuk/doublestar/v4" + "github.com/bmatcuk/doublestar/v4" "golang.org/x/sync/errgroup" ) @@ -366,7 +366,7 @@ func licenseHeader(path string, tmpl *template.Template, data LicenseData) ([]by lic, err = executeTemplate(tmpl, data, "/**", " * ", " */") case ".cc", ".cpp", ".cs", ".go", ".hh", ".hpp", ".m", ".mm", ".proto", ".rs", ".swift", ".dart", ".groovy", ".v", ".sv", ".lr": lic, err = executeTemplate(tmpl, data, "", "// ", "") - case ".py", ".sh", ".bash", ".zsh", ".yaml", ".yml", ".dockerfile", "dockerfile", ".rb", "gemfile", ".ru", ".tcl", ".hcl", ".tf", ".tfvars", ".nomad", ".bzl", ".pl", ".pp", ".ps1", ".psd1", ".psm1": + case ".py", ".sh", ".bash", ".zsh", ".yaml", ".yml", ".dockerfile", "dockerfile", ".rb", "gemfile", ".ru", ".tcl", ".hcl", ".tf", ".tfvars", ".nomad", ".bzl", ".pl", ".pp", ".ps1", ".psd1", ".psm1", ".txtar": lic, err = executeTemplate(tmpl, data, "", "# ", "") case ".el", ".lisp": lic, err = executeTemplate(tmpl, data, "", ";; ", "") diff --git a/addlicense/main_test.go b/addlicense/main_test.go index 46b183c..89d406b 100644 --- a/addlicense/main_test.go +++ b/addlicense/main_test.go @@ -318,7 +318,7 @@ func TestLicenseHeader(t *testing.T) { "// HYS\n\n", }, { - []string{"f.py", "f.sh", ".bash", ".zsh", "f.yaml", "f.yml", "f.dockerfile", "dockerfile", "f.rb", "gemfile", ".ru", "f.tcl", "f.bzl", "f.pl", "f.pp", "f.ps1", "f.psd1", "f.psm1", "f.hcl", "f.tf", "f.nomad", "f.tfvars"}, + []string{"f.py", "f.sh", ".bash", ".zsh", "f.yaml", "f.yml", "f.dockerfile", "dockerfile", "f.rb", "gemfile", ".ru", "f.tcl", "f.bzl", "f.pl", "f.pp", "f.ps1", "f.psd1", "f.psm1", "f.hcl", "f.tf", "f.nomad", "f.tfvars", "f.txtar"}, "# HYS\n\n", }, { diff --git a/cmd/headers.go b/cmd/headers.go index 097cf91..7cae659 100644 --- a/cmd/headers.go +++ b/cmd/headers.go @@ -86,7 +86,7 @@ config, see the "copywrite init" command.`, autoSkippedPatterns := []string{ ".github/workflows/**", ".github/dependabot.yml", - "**node_modules/**", + "**/node_modules/**", } ignoredPatterns := lo.Union(conf.Project.HeaderIgnore, autoSkippedPatterns)