From e1f1db4ace7bc70685edec274b1e938d82ed2435 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Tue, 31 Dec 2024 09:59:33 -0800 Subject: [PATCH] chore: update copyright header Signed-off-by: Doug MacEachern --- client.go | 18 ++---------- hack/boilerplate/boilerplate.go.txt | 18 ++---------- scripts/headers/go.txt | 15 ---------- scripts/headers/rb.txt | 13 --------- scripts/license.sh | 43 ----------------------------- 5 files changed, 6 insertions(+), 101 deletions(-) delete mode 100644 scripts/headers/go.txt delete mode 100644 scripts/headers/rb.txt delete mode 100755 scripts/license.sh diff --git a/client.go b/client.go index 5becedd48..c67e74b05 100644 --- a/client.go +++ b/client.go @@ -1,18 +1,6 @@ -/* -Copyright (c) 2014-2023 VMware, Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// © Broadcom. All Rights Reserved. +// The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. +// SPDX-License-Identifier: Apache-2.0 /* This package is the root package of the govmomi library. diff --git a/hack/boilerplate/boilerplate.go.txt b/hack/boilerplate/boilerplate.go.txt index c434d073f..e7d6eba4d 100644 --- a/hack/boilerplate/boilerplate.go.txt +++ b/hack/boilerplate/boilerplate.go.txt @@ -1,15 +1,3 @@ -/* -Copyright (c) 2014-2023 VMware, Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// © Broadcom. All Rights Reserved. +// The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. +// SPDX-License-Identifier: Apache-2.0 diff --git a/scripts/headers/go.txt b/scripts/headers/go.txt deleted file mode 100644 index e684b8a56..000000000 --- a/scripts/headers/go.txt +++ /dev/null @@ -1,15 +0,0 @@ -/* -Copyright (c) ${YEARS} VMware, Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ diff --git a/scripts/headers/rb.txt b/scripts/headers/rb.txt deleted file mode 100644 index 1c3bd22d4..000000000 --- a/scripts/headers/rb.txt +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) ${YEARS} VMware, Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/scripts/license.sh b/scripts/license.sh deleted file mode 100755 index a9b59e1ce..000000000 --- a/scripts/license.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -set -e - -header_dir=$(dirname $0)/headers - -tmpfile=$(mktemp) -trap "rm -f ${tmpfile}" EXIT - -git diff --name-status main | awk '{print $NF}' | while read file; do - years=( $(git log --format='%ai' $file | cut -d- -f1 | sort -u) ) - num_years=${#years[@]} - - if [ "${num_years}" == 0 ]; then - export YEARS="$(date +%Y)" - else - yearA=${years[0]} - yearB=${years[$((${num_years}-1))]} - - export YEARS="${yearA}-${yearB}" - fi - - case "$file" in - vim25/{json,xml}/*) - # Ignore - ;; - *.go) - sed -e "s/\${YEARS}/${YEARS}/" ${header_dir}/go.txt > ${tmpfile} - last_header_line=$(grep -n '\*/' ${file} | head -1 | cut -d: -f1) - tail -n +$((${last_header_line} + 1)) ${file} >> ${tmpfile} - mv ${tmpfile} ${file} - ;; - *.rb) - sed -e "s/\${YEARS}/${YEARS}/" ${header_dir}/rb.txt > ${tmpfile} - last_header_line=$(grep -n '^$' ${file} | head -1 | cut -d: -f1) - tail -n +$((${last_header_line})) ${file} >> ${tmpfile} - mv ${tmpfile} ${file} - ;; - *) - echo "Unhandled file: $file" - ;; - esac -done