Skip to content

Conversation

@katiewasnothere
Copy link
Contributor

Motivation and Context

Now that we're in 2026, we need to update the license headers on all the files. Unfortunately, Hawkeye doesn't have an attribute for the current year to help us avoid this in the future. Instead, I had to work around this by doing the following:

  1. Update licenserc.toml with:
     [properties]
      ... (other properties)
      currentYear = "2026"
    

 
2. Update scripts/license-header.txt with
Copyright ©{{ " " }}{%- set created = attrs.git_file_created_year or attrs.disk_file_created_year -%}{%- set modified = props["currentYear"] -%}{%- if created != modified -%} {{created}}-{{modified}}{%- else -%}{{created}}{%- endif -%}{{ " " }}{{ props["copyrightOwner"] }}.

Then I removed these two changes before committing. After this PR is merged, all files will have recently had git updates, so the existing code for setting the modified year should work as intended.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
@katiewasnothere katiewasnothere force-pushed the update_license_header_years branch from f9c3d52 to 5eca6d4 Compare January 5, 2026 20:41
katiewasnothere added a commit to apple/containerization that referenced this pull request Jan 5, 2026
Related to apple/container#1024

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
@katiewasnothere katiewasnothere merged commit d6f052d into apple:main Jan 5, 2026
2 checks passed
@katiewasnothere katiewasnothere deleted the update_license_header_years branch January 5, 2026 21:09
ParkSeongGeun pushed a commit to ParkSeongGeun/container that referenced this pull request Jan 8, 2026
…#1024)

## Motivation and Context
Now that we're in 2026, we need to update the license headers on all the
files. Unfortunately, Hawkeye doesn't have an attribute for the current
year to help us avoid this in the future. Instead, I had to work around
this by doing the following:

1. Update licenserc.toml with:
     ```
      [properties]
       ... (other properties)
       currentYear = "2026"
     ```
 
2. Update scripts/license-header.txt with
    ```
Copyright ©{{ " " }}{%- set created = attrs.git_file_created_year or
attrs.disk_file_created_year -%}{%- set modified = props["currentYear"]
-%}{%- if created != modified -%} {{created}}-{{modified}}{%- else
-%}{{created}}{%- endif -%}{{ " " }}{{ props["copyrightOwner"] }}.
    ```

Then I removed these two changes before committing. After this PR is
merged, all files will have recently had git updates, so the existing
code for setting the modified year should work as intended.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
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

Successfully merging this pull request may close these issues.

2 participants