Skip to content

Commit

Permalink
chore: add copyright header automation
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMSchmidt committed Mar 3, 2023
1 parent 50d6253 commit eedc89a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .copywrite.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
schema_version = 1

project {
license = "MPL-2.0"
copyright_year = 2021

# (OPTIONAL) A list of globs that should not have copyright/license headers.
# Supports doublestar glob patterns for more flexibility in defining which
# files or folders should be ignored
header_ignore = [
# "vendors/**",
# "**autogen**",
"**/node_modules/**",
]
}
6 changes: 6 additions & 0 deletions .github/workflows/build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,14 @@ new TextFile(project, "src/inputs.ts", {
});
project.prettier?.addIgnorePattern("src/inputs.ts");

// Add copywrite headers to all files
project.buildWorkflow?.addPostBuildSteps(
{
name: "Setup Copywrite tool",
uses: "hashicorp/setup-copywrite@3ace06ad72e6ec679ea8572457b17dbc3960b8ce", // v1.0.0
with: { token: "${{ secrets.GITHUB_TOKEN }}" },
},
{ name: "Add headers using Copywrite tool", run: "copywrite headers" }
);

project.synth();

0 comments on commit eedc89a

Please sign in to comment.