File tree 3 files changed +15
-0
lines changed
3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,12 @@ flake8:
55
55
stage : check
56
56
script : poetry run flake8 deepl tests
57
57
58
+ licenseCheck :
59
+ stage : check
60
+ script :
61
+ - ./license_checker.sh '*.py' | tee license_check_output.txt
62
+ - ' [ ! -s license_check_output.txt ]'
63
+
58
64
# stage: build ----------------------
59
65
60
66
package :
Original file line number Diff line number Diff line change @@ -9,10 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
### Added
10
10
* Add [ example script] ( examples/mustache ) to translate Mustache templates.
11
11
* Add support for storing your API Key in a keyring via the ` keyring ` module.
12
+ * Added a CI check for copyright headers.
12
13
### Changed
13
14
### Deprecated
14
15
### Removed
15
16
### Fixed
17
+ * Copyright headers are updated for 2023
16
18
### Security
17
19
* Update ` certifi ` to resolve security advisory.
18
20
* ` certifi ` is a development-only dependency; library users are unaffected.
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Usage: ./license_checker.sh source_code_pattern
4
+ # Example: ./license_checker.sh '*.py'
5
+ # This will search all .py files, ignoring anything not tracked in your git tree
6
+
7
+ git ls-files -z $1 | xargs -0 -I{} sh -c ' RES=$(head -n 3 "{}" | grep "Copyright 20[0-9][0-9] DeepL SE (https://www.deepl.com)"); if [ ! "${RES}" ] ; then echo "Lacking copyright header in" "{}" ; fi'
You can’t perform that action at this time.
0 commit comments