Skip to content

Commit 7db3f6a

Browse files
authored
feat: ✨ add locked var for copyright year (#115)
# Description This adds a copier var for the copyright year that won't change with updates. Closes #97, closes #78 This PR needs a quick review. ## Checklist - [x] Formatted Markdown - [x] Ran `just run-all`
1 parent aa4ed68 commit 7db3f6a

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

copier.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,8 @@ github_board_number:
5454
{% if github_board_number and not github_board_number.isdigit() %}
5555
The board number must be an integer.
5656
{% endif %}
57+
58+
copyright_year:
59+
type: str
60+
default: "{{ copyright_year | default('%Y' | strftime) }}"
61+
when: false

template/LICENSE-MIT.md.jinja

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# MIT License
22

3-
<!-- TODO: Add the year -->
4-
5-
Copyright (c) YEAR {{ package_abbrev }} authors
3+
Copyright (c) {{ copyright_year }} {{ package_abbrev }} authors
64

75
Permission is hereby granted, free of charge, to any person obtaining a copy
86
of this software and associated documentation files (the "Software"), to deal
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
{{ dict(_copier_answers, copyright_year=copyright_year) | to_nice_yaml -}}

0 commit comments

Comments
 (0)