Skip to content

Commit

Permalink
Calculate current year
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielFran committed Jan 2, 2024
1 parent 9987b31 commit 761b82f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/copyright-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
# 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

0 comments on commit 761b82f

Please sign in to comment.