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

Fix copyright update workflow #24723

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/copyright-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

name: Copyright Update
on:
pull_request:
schedule:
- cron: '0 0 31 12 *' # Repeats December 31st every year

Expand All @@ -41,9 +42,11 @@ jobs:
fetch-depth: 0
# Update the copyright headers
- name: Find and Replace
# CURRENT_YEAR=$(date +'%Y')
# NEW_YEAR=$(($CURRENT_YEAR + 1))
run: |
CURRENT_YEAR=$(date +'%Y')
NEW_YEAR=$(($CURRENT_YEAR + 1))
NEW_YEAR=$(date +'%Y')
CURRENT_YEAR=$(($NEW_YEAR - 1))
grep -rlZE "Copyright ([0-9]+)-$CURRENT_YEAR" . | xargs -0 sed -i -E "s/Copyright ([0-9]+)-$CURRENT_YEAR/Copyright \1-$NEW_YEAR/g"
# Create PR
- name: Create Pull Request
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2013-2023 the original author or authors from the JHipster project.
# Copyright the original author or authors from the JHipster project.
#
# This file is part of the JHipster project, see https://www.jhipster.tech/
# for more information.
Expand Down
Loading