diff --git a/copier.yaml b/copier.yaml index 338b904..c154eb7 100644 --- a/copier.yaml +++ b/copier.yaml @@ -40,3 +40,8 @@ github_board_number: {% if github_board_number and not github_board_number.isdigit() %} The board number must be an integer. {% endif %} + +copyright_year: + type: str + default: "{{ copyright_year | default('%Y' | strftime) }}" + when: false diff --git a/template/LICENSE-MIT.md.jinja b/template/LICENSE-MIT.md.jinja index bc00010..2c2d8e8 100644 --- a/template/LICENSE-MIT.md.jinja +++ b/template/LICENSE-MIT.md.jinja @@ -1,8 +1,6 @@ # MIT License - - -Copyright (c) YEAR {{ package_abbrev }} authors +Copyright (c) {{ copyright_year }} {{ package_abbrev }} authors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/template/{{ _copier_conf.answers_file }}.jinja b/template/{{ _copier_conf.answers_file }}.jinja new file mode 100644 index 0000000..a8c521e --- /dev/null +++ b/template/{{ _copier_conf.answers_file }}.jinja @@ -0,0 +1,2 @@ +# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY +{{ dict(_copier_answers, copyright_year=copyright_year) | to_nice_yaml -}}