File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,12 @@ flake8:
5555 stage : check
5656 script : poetry run flake8 deepl tests
5757
58+ licenseCheck :
59+ stage : check
60+ script :
61+ - ./license_checker.sh '*.py' | tee license_check_output.txt
62+ - ' [ ! -s license_check_output.txt ]'
63+
5864# stage: build ----------------------
5965
6066package :
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
99### Added
1010* Add [ example script] ( examples/mustache ) to translate Mustache templates.
1111* Add support for storing your API Key in a keyring via the ` keyring ` module.
12+ * Added a CI check for copyright headers.
1213### Changed
1314### Deprecated
1415### Removed
1516### Fixed
17+ * Copyright headers are updated for 2023
1618### Security
1719* Update ` certifi ` to resolve security advisory.
1820 * ` 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