Skip to content

Commit 3bfc05d

Browse files
committed
chore: fix insert-license pre-commit
1 parent a5cd313 commit 3bfc05d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repos:
55
- id: check-yaml
66
- id: check-toml
77
- repo: https://github.com/Lucas-C/pre-commit-hooks
8-
rev: v1.3.1
8+
rev: v1.4.2
99
hooks:
1010
- id: insert-license
1111
files: \.rs$
@@ -14,6 +14,7 @@ repos:
1414
- scripts/license-header.txt
1515
- --comment-style
1616
- //
17+
- --use-current-year
1718
- repo: local
1819
hooks:
1920
- id: cargo-sort
@@ -24,4 +25,3 @@ repos:
2425
types: [file, toml]
2526
files: Cargo\.toml
2627
pass_filenames: false
27-

scripts/check-license.sh

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -eu
44

55
for i in $(git ls-files --exclude-standard | grep "\.rs"); do
66
# first line -> match -> print line -> quit
7-
matches=$(sed -n "1{/Copyright [0-9]\{4\} CeresDB Project Authors. Licensed under Apache-2.0./p;};q;" $i)
7+
matches=$(sed -n "1{/CeresDB Project Authors. Licensed under Apache-2.0./p;};q;" $i)
88
if [ -z "${matches}" ]; then
99
echo "License header is missing from $i."
1010
exit 1

scripts/license-header.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Copyright 2022 CeresDB Project Authors. Licensed under Apache-2.0.
1+
Copyright 2023 CeresDB Project Authors. Licensed under Apache-2.0.

0 commit comments

Comments
 (0)