From f0c919768b1aeafd3ed32caa91a135e30824051d Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Wed, 19 May 2021 14:06:42 +0200 Subject: [PATCH] Add license header to our scripts and workflows (#11282) Motivation: We should have license header whenever possible. Modifications: Add header to scripts and workflow config Result: More clear licensing --- .github/scripts/check_build_result.sh | 15 +++++++++++++++ .github/scripts/check_leak.sh | 15 +++++++++++++++ .github/scripts/merge_local_staging.sh | 15 +++++++++++++++ .github/scripts/release_checkout_tag.sh | 15 +++++++++++++++ .github/scripts/release_rollback.sh | 15 +++++++++++++++ .github/workflows/ci-build.yml | 15 +++++++++++++++ .github/workflows/ci-deploy.yml | 15 +++++++++++++++ .github/workflows/ci-pr-reports.yml | 15 +++++++++++++++ .github/workflows/ci-pr.yml | 15 +++++++++++++++ .github/workflows/ci-release.yml | 15 +++++++++++++++ .github/workflows/codeql-analysis.yml | 15 +++++++++++++++ .../io/netty/handler/ssl/generate-certs.sh | 15 +++++++++++++++ run-example.sh | 15 +++++++++++++++ scripts/finish_release.sh | 15 +++++++++++++++ scripts/generate_docs.sh | 15 +++++++++++++++ scripts/list_staged_release.sh | 15 +++++++++++++++ 16 files changed, 240 insertions(+) diff --git a/.github/scripts/check_build_result.sh b/.github/scripts/check_build_result.sh index 5c389da20b2..9ef6fcce449 100755 --- a/.github/scripts/check_build_result.sh +++ b/.github/scripts/check_build_result.sh @@ -1,4 +1,19 @@ #!/bin/bash +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- set -e if [ "$#" -ne 1 ]; then diff --git a/.github/scripts/check_leak.sh b/.github/scripts/check_leak.sh index 1e69c52defb..7a1a39d3636 100755 --- a/.github/scripts/check_leak.sh +++ b/.github/scripts/check_leak.sh @@ -1,4 +1,19 @@ #!/bin/bash +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- set -e if [ "$#" -ne 1 ]; then diff --git a/.github/scripts/merge_local_staging.sh b/.github/scripts/merge_local_staging.sh index a008da0aee0..324f6f74da6 100755 --- a/.github/scripts/merge_local_staging.sh +++ b/.github/scripts/merge_local_staging.sh @@ -1,4 +1,19 @@ #!/bin/bash +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- set -e if [ "$#" -lt 2 ]; then echo "Expected target directory and at least one local staging directory" diff --git a/.github/scripts/release_checkout_tag.sh b/.github/scripts/release_checkout_tag.sh index b87e4b8857a..73972b8e85f 100755 --- a/.github/scripts/release_checkout_tag.sh +++ b/.github/scripts/release_checkout_tag.sh @@ -1,4 +1,19 @@ #!/bin/bash +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- set -e if [ "$#" -ne 1 ]; then diff --git a/.github/scripts/release_rollback.sh b/.github/scripts/release_rollback.sh index d98951ef11e..52cd9a1dc69 100755 --- a/.github/scripts/release_rollback.sh +++ b/.github/scripts/release_rollback.sh @@ -1,4 +1,19 @@ #!/bin/bash +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- set -e if [ "$#" -ne 3 ]; then diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index babf496908f..ad5448f81ca 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -1,3 +1,18 @@ +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- name: Build project on: diff --git a/.github/workflows/ci-deploy.yml b/.github/workflows/ci-deploy.yml index 243b7eefacd..a94656d97fc 100644 --- a/.github/workflows/ci-deploy.yml +++ b/.github/workflows/ci-deploy.yml @@ -1,3 +1,18 @@ +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- name: Deploy project on: diff --git a/.github/workflows/ci-pr-reports.yml b/.github/workflows/ci-pr-reports.yml index da49964cd23..475db06bc86 100644 --- a/.github/workflows/ci-pr-reports.yml +++ b/.github/workflows/ci-pr-reports.yml @@ -1,3 +1,18 @@ +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- name: PR Reports on: workflow_run: diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index c7ca888173b..686552240c3 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -1,3 +1,18 @@ +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- name: Build PR on: diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 484c5cba174..d938edead33 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -1,3 +1,18 @@ +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- name: Release on: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b695feb2a69..0c254d98d85 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,3 +1,18 @@ +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- # For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # diff --git a/handler/src/test/resources/io/netty/handler/ssl/generate-certs.sh b/handler/src/test/resources/io/netty/handler/ssl/generate-certs.sh index 9375b8d78ca..bdcb080de2b 100755 --- a/handler/src/test/resources/io/netty/handler/ssl/generate-certs.sh +++ b/handler/src/test/resources/io/netty/handler/ssl/generate-certs.sh @@ -1,4 +1,19 @@ #!/bin/sh +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- # Generate a new, self-signed root CA openssl req -extensions v3_ca -new -x509 -days 30 -nodes -subj "/CN=NettyTestRoot" -newkey rsa:2048 -sha512 -out mutual_auth_ca.pem -keyout mutual_auth_ca.key diff --git a/run-example.sh b/run-example.sh index c1de7e95758..dd078f2f4a2 100755 --- a/run-example.sh +++ b/run-example.sh @@ -1,4 +1,19 @@ #!/bin/bash -e +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- EXAMPLE_MAP=( 'discard-client:io.netty.example.discard.DiscardClient' 'discard-server:io.netty.example.discard.DiscardServer' diff --git a/scripts/finish_release.sh b/scripts/finish_release.sh index f436f3e1383..78e5ed2948a 100755 --- a/scripts/finish_release.sh +++ b/scripts/finish_release.sh @@ -1,4 +1,19 @@ #!/bin/bash +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- set -e if [ "$#" -ne 2 ]; then diff --git a/scripts/generate_docs.sh b/scripts/generate_docs.sh index a5d73ae1f8a..af24277e0dc 100755 --- a/scripts/generate_docs.sh +++ b/scripts/generate_docs.sh @@ -1,4 +1,19 @@ #!/bin/bash +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- set -e # Adjust for different branch if needed VERSION=5.0 diff --git a/scripts/list_staged_release.sh b/scripts/list_staged_release.sh index c71aac0116d..2ae3b5adc88 100755 --- a/scripts/list_staged_release.sh +++ b/scripts/list_staged_release.sh @@ -1,4 +1,19 @@ #!/bin/bash +# ---------------------------------------------------------------------------- +# Copyright 2021 The Netty Project +# +# The Netty Project licenses this file to you 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: +# +# https://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. +# ---------------------------------------------------------------------------- set -e RC_LIST=$(mvn org.sonatype.plugins:nexus-staging-maven-plugin:rc-list -DserverId=sonatype-nexus-staging -DnexusUrl=https://oss.sonatype.org | grep -A 2 "\[INFO\] ID State Description")