Skip to content

Feat(CI): Copyright text replacement#67

Draft
elpiel wants to merge 3 commits into
masterfrom
feat/ci-copyright-replacement
Draft

Feat(CI): Copyright text replacement#67
elpiel wants to merge 3 commits into
masterfrom
feat/ci-copyright-replacement

Conversation

@elpiel

@elpiel elpiel commented Jan 10, 2024

Copy link
Copy Markdown
Member

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' {} \;

Signed-off-by: Lachezar Lechev <lachezar@ambire.com>
Signed-off-by: Lachezar Lechev <lachezar@ambire.com>
@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