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 license year #871

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Update license year #871

merged 1 commit into from
Jan 7, 2025

Conversation

bioball
Copy link
Contributor

@bioball bioball commented Jan 2, 2025

Happy new year!

This adds logic to update the license header year only when source code files change.

For new files, they will receive the current year as the license year.

For existing files, they will receive a range from the initial year to the current year (e.g. 2024-2025 for the set of files currently in the repo).

For those like me that call apple/pkl something other than "origin", set the env var PKL_ORIGINAL_REMOTE_NAME when developing locally. Personally, I have set PKL_ORIGINAL_REMOTE_NAME=upstream.

@bioball bioball force-pushed the license-year-update branch from 6e884e0 to 6d63bd9 Compare January 2, 2025 19:39
* Update license header file spec to use placeholder year
* Update spotless to use ratchet formatting (only format files that have changed)
@bioball bioball force-pushed the license-year-update branch from 6d63bd9 to a150917 Compare January 2, 2025 19:40
spotless {
ratchetFrom = "$originalRemoteName/main"
Copy link
Contributor Author

@bioball bioball Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd love to just say "the remote whose URL is [email protected]:apple/pkl.git", but it doesn't look like Spotless supports this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd also need to account for HTTPS remotes in that case, which can get messy :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, true!

@bioball bioball merged commit f6c74e9 into apple:main Jan 7, 2025
5 checks passed
@bioball bioball deleted the license-year-update branch January 7, 2025 10:15
bioball added a commit to bioball/pkl that referenced this pull request Jan 17, 2025
* Update license header file spec to use placeholder year
* Update spotless to use ratchet formatting (only format files that have changed)
bioball added a commit that referenced this pull request Jan 17, 2025
* Update license header file spec to use placeholder year
* Update spotless to use ratchet formatting (only format files that have changed)
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.

3 participants