update copyrights on changed files when creating auto dependency bump PR

This commit is contained in:
Ryan Richard
2026-01-21 11:41:35 -08:00
parent 47bcaefa65
commit 801591fed0

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Copyright 2020-2025 the Pinniped contributors. All Rights Reserved.
# Copyright 2020-2026 the Pinniped contributors. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
@@ -26,6 +26,16 @@ git add .
# Print the current status to the log.
git status
# Update copyrights on the staged files, if needed.
echo "Updating copyrights as needed ..."
./hack/update-copyright-year.sh
# Add all the changed files again, in case copyrights were updated.
git add .
# Print the current status to the log.
git status
# Did we just stage any changes?
staged=$(git --no-pager diff --staged)
if [[ "$staged" == "" ]]; then