Skip to content

chore: bump copyright to 2023 and fix wrong copyrights#5892

Merged
PastaPastaPasta merged 2 commits intodashpay:developfrom
knst:bump-copyright-2023
Feb 24, 2024
Merged

chore: bump copyright to 2023 and fix wrong copyrights#5892
PastaPastaPasta merged 2 commits intodashpay:developfrom
knst:bump-copyright-2023

Conversation

@knst
Copy link
Collaborator

@knst knst commented Feb 21, 2024

Issue being fixed or feature implemented

Bump copyright year to 2023-2024

What was done?

run copyright_header.py report and copyright_header.py update
previous work: https://github.com/dashpay/dash/pull/5160/files

How Has This Been Tested?

Please, notice, that copyrights should be updated at the end of year, not at the beginning of year for next years.
That prevent bumping year for files where is only changes in that year - bumping a copyright. This misbehavior can be validated by running copyright_header.py update twice. So, bump 2024 should be done in December 2024, not in 2025.

Breaking Changes

n/a

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone

@knst knst added this to the 20.1 milestone Feb 21, 2024
@PastaPastaPasta
Copy link
Member

I wonder if you could make this a scripted diff easily?

@knst knst force-pushed the bump-copyright-2023 branch 2 times, most recently from 2c18f2f to f653c96 Compare February 21, 2024 20:24
@PastaPastaPasta
Copy link
Member

I wonder if it would be better for you backdate this commit f653c96 back to 2023 to that we don't have that issue of "bump copyright to 2024 because we bumped copyright to 2023"? We would likely then have to merge via merge commit

@PastaPastaPasta
Copy link
Member

Also it appears the scripted diff fails

@knst knst marked this pull request as draft February 21, 2024 21:14
@knst knst force-pushed the bump-copyright-2023 branch from f653c96 to 49b2978 Compare February 22, 2024 10:17
@knst
Copy link
Collaborator Author

knst commented Feb 22, 2024

backdate this commit f653c96 back to 2023

that is a good idea, it works, thanks.
I run script twice and there's no more multiple changes complaining that it's 2024 now.

@knst knst marked this pull request as ready for review February 22, 2024 10:20
@knst knst marked this pull request as draft February 22, 2024 10:35
@knst knst force-pushed the bump-copyright-2023 branch 3 times, most recently from 4f35b52 to 86a4dc5 Compare February 22, 2024 11:14
@knst
Copy link
Collaborator Author

knst commented Feb 22, 2024

Date: Sun Dec 31 00:00:00 2023 +0000

I tried to set mocked date for commit, and it works locally, but CI still complains: https://gitlab.com/dashpay/dash/-/jobs/6232575556

So, I turned a commit to non-scripted one, have no idea why CI behaves differently.

@kxcd
Copy link

kxcd commented Feb 22, 2024

You could try to script it so.

find . -name '*[sp][hpy]' -type f -exec sed 's/\(Copyright (c) 20..-202\).\( The Dash Core developers\)/\14\2/gi' '{}' \;

add a -i to the sed to make that change into the file.

@knst
Copy link
Collaborator Author

knst commented Feb 22, 2024

You could try to script it so.

There's already a script that does it by more advanced way using git history:

contrib/devtools/copyright_header.py update ./

it is just doesn't work fully as expected in CI

@knst knst force-pushed the bump-copyright-2023 branch from 86a4dc5 to 2e81661 Compare February 22, 2024 12:56
@knst knst marked this pull request as ready for review February 23, 2024 11:52
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK for squash merge

knst added 2 commits February 24, 2024 11:05
that's a result of:
contrib/devtools/copyright_header.py update ./

it is not scripted diff, because it works differentlly on my localhost and in CI:
CI doesn't want to use git commit date which is mocked to 30th Dec of 2023
@PastaPastaPasta PastaPastaPasta merged commit d686dc2 into dashpay:develop Feb 24, 2024
@knst knst deleted the bump-copyright-2023 branch February 25, 2024 13:11
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.

4 participants