Skip to content

Feat(CI): Copyright text replacement #67

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

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

elpiel
Copy link
Member

@elpiel elpiel commented Jan 10, 2024

TODOs:
The workflow still needs to:

  • create new branch
  • commit changes
  • push (with access to repo) to remote
  • open a PR
    For this PR to be considered ready for review.

Development

Updating the copyright text in files

You can update the copyright text using the following command, replacing the old Copyright with latest year:

  1. Install sd, alternative to sed: cargo install sd
  2. To replace 2023 with 2024, run:
  3. find . \( -path ./target -prune -o -path ./.git -prune \) -o -type f -exec sd "Copyright (C) 2017-2023" "Copyright (C) 2017-2024" {} \;
  • we exclude .git and target folders and the README as it contains this string and will be replaced too.

TODO: fix env. variables

THIS_YEAR=$(date +%Y) && LAST_YEAR=$(date +%Y -d "-1 year") && find . \( -path ./target -prune -o -path ./.git -prune \) -o -type f -exec sd '2017-\$LAST_YEAR' '2017-\$THIS_YEAR' {} \;

@elpiel elpiel mentioned this pull request Jan 12, 2024
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.

1 participant