commands: add spack license update-copyright-year

This adds a new subcommand to `spack license` that automatically updates
the copyright year in files that should have a license header.

- [x] add `spack license update-copyright-year` command
- [x] add test
This commit is contained in:
Todd Gamblin
2021-01-01 23:09:18 -08:00
parent 4d94c4c460
commit 78f39bdfee
3 changed files with 65 additions and 20 deletions

View File

@@ -1042,9 +1042,9 @@ _spack_install() {
_spack_license() {
if $list_options
then
SPACK_COMPREPLY="-h --help"
SPACK_COMPREPLY="-h --help --root"
else
SPACK_COMPREPLY="list-files verify"
SPACK_COMPREPLY="list-files verify update-copyright-year"
fi
}
@@ -1053,7 +1053,11 @@ _spack_license_list_files() {
}
_spack_license_verify() {
SPACK_COMPREPLY="-h --help --root"
SPACK_COMPREPLY="-h --help"
}
_spack_license_update_copyright_year() {
SPACK_COMPREPLY="-h --help"
}
_spack_list() {