Skip to content

Commit

Permalink
Treat copyright_year as variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dalito committed Jan 19, 2025
1 parent fda40ed commit b5080d7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions copier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ license:
- GNU GPL v3.0
default: MIT

copyright_year:
help: The year of the first release
type: str
default: "{% now 'utc', '%Y' %}"

author:
help: The author of the schema
type: str
Expand Down Expand Up @@ -127,6 +132,7 @@ _skip_if_exists:
# files or dirs that should not be overwritten if they already exist in the project
- {{ source_path}}
- LICENSE
- README.md

_message_after_copy: |
** PROJECT CREATION COMPLETE **
Expand Down
2 changes: 1 addition & 1 deletion licenses/Apache-2
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {% now 'utc', '%Y' %} {{full_name}}
Copyright {{copyright_year}} {{full_name}}

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion licenses/BSD-3
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#- source: http://opensource.org/licenses/BSD-3-Clause #}
Copyright (c) {% now 'utc', '%Y' %} {{full_name}}
Copyright (c) {{copyright_year}} {{full_name}}
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion licenses/MIT
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{#- source: http://opensource.org/licenses/MIT #}
The MIT License (MIT)

Copyright (c) {% now 'utc', '%Y' %} {{full_name}}
Copyright (c) {{copyright_year}} {{full_name}}

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit b5080d7

Please sign in to comment.