Skip to content

Commit 686f00b

Browse files
Merge pull request #48 from adamread/license-year-improvement
Update to license check to use the current year.
2 parents ba23cd9 + 63b4e14 commit 686f00b

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

license-config.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"regexIdentifier": "%%",
23
"ignore": [
34
".claspignore",
45
".editorconfig",
@@ -18,7 +19,9 @@
1819
"eslint.config.js",
1920
"eslint.config.cjs",
2021
"src/ui/.angular",
21-
"src/ui/.prettierrc"
22+
"src/ui/.prettierrc",
23+
"node_modules",
24+
"license-config.json"
2225
],
2326
"license": "license-header.txt",
2427
"licenseFormats": {

license-header.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2025 Google LLC
1+
Copyright %%[0-9]{4}%% Google LLC
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"lint": "npm run license && eslint --fix src/ test/",
3333
"lint:staged": "npm run license && lint-staged",
3434
"build": "npm run clean && npm run lint && tsc && npm run copy-files",
35-
"license": "license-check-and-add add -f license-config.json",
35+
"license": "license-check-and-add add -f license-config.json -r $(date +%Y)",
3636
"test": "jest test/ --detectOpenHandles",
3737
"copy-files": "ncp .gitignore dist/.gitignore-target",
3838
"prepare": "is-ci || husky install"

src/config.ts

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const config: {
5151
bundle: 'rollup --no-treeshake -c rollup.config.mjs',
5252
build:
5353
'npm run clean && npm run bundle && ncp appsscript.json dist/appsscript.json',
54-
license: 'license-check-and-add add -f license-config.json',
54+
license: 'license-check-and-add add -f license-config.json -r $(date +%Y)',
5555
test: 'jest test/ --passWithNoTests --detectOpenHandles',
5656
deploy:
5757
'npm run lint && npm run test && npm run build && ncp .clasp-dev.json .clasp.json && clasp push -f',
@@ -117,7 +117,7 @@ export const configForUi: {
117117
bundle: 'rollup --no-treeshake -c rollup.config.mjs',
118118
build: 'npm run clean && npm run bundle',
119119
'build-ui': 'npm run build --prefix src/ui',
120-
license: 'license-check-and-add add -f license-config.json',
120+
license: 'license-check-and-add add -f license-config.json -r $(date +%Y)',
121121
test: 'jest test/ --passWithNoTests --detectOpenHandles',
122122
'test-ui': 'npm run test --prefix src/ui',
123123
deploy:

0 commit comments

Comments
 (0)