Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Copyright year #77

Open
sgabenov opened this issue Jul 11, 2023 · 3 comments
Open

Update Copyright year #77

sgabenov opened this issue Jul 11, 2023 · 3 comments

Comments

@sgabenov
Copy link

I want to manage not only copyright header, but also years in it.

For example, my header should look like:
copyright_holder = "HashiCorp, Inc. 2014-2023"

  1. So, when i run copywrite headers over file having already created header "HashiCorp, Inc. 2014-2022" will be changed into --> "HashiCorp, Inc. 2014-2023"
  2. .copywrite.hcl config file should support variables, so i can template headers like
copyright_holder = "HashiCorp, Inc. ${var.copyright_year}-2023"
copyright_year = 2014
@CalebAlbers
Copy link
Member

@sgabenov thanks for taking the time to outline this! Currently, we use a forked and modified version of addLicense to manage the copyright header additions. Copywrite's current functionality is append-only; it doesn't support identifying and replacing existing copyright headers.

That said, I'd welcome the functionality. It likely isn't something that will be prioritized on the internal roadmap, but if that's something you'd be interested in contributing to, we can chat about implementation options.

I like the template string idea for the copyright statement - I could see having a base set of available templating options, such as copyright_year, current_year, copyright_holder(s), spdx_license_id, etc.

@iavael
Copy link

iavael commented Aug 16, 2023

Isn't copyright year should reflect years when copyrighted work was changed? In that case, if a work is licensed on a per-file basis, then the copyright dates of a particular file should contain only years when changes took place.

@CalebAlbers
Copy link
Member

@iavael The copyright claim itself is based on the year of initial publication*, so we made the conscious decision to not include the current year or any years a modification took place in the claim. The upside is that it leaves a cleaner file history and doesn't require changing the copyright statement annually.

*Obligatory "I'm not a lawyer" disclaimer 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants