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

Adding SPDX Authors headers using Apache 2.0. #681

Merged
merged 1 commit into from
Apr 22, 2021
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 27 additions & 0 deletions hack/boilerplate/add-boilerplate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

# Copyright 2021 The CloudEvents Authors
# SPDX-License-Identifier: Apache-2.0

USAGE=$(cat <<EOF
Add boilerplate.<ext>.txt to all .<ext> files missing it in a directory.

Usage: (from repository root)
./hack/boilerplate/add-boilerplate.sh <ext> <DIR>

Example: (from repository root)
./hack/boilerplate/add-boilerplate.sh go cmd
EOF
)

set -e

if [[ -z $1 || -z $2 ]]; then
echo "${USAGE}"
exit 1
fi

grep --recursive --files-without-match --extended-regexp --regexp="Copyright \d+ The CloudEvents Authors" $2 \
| grep --regexp="\.$1\$" \
| xargs -I {} sh -c \
"cat hack/boilerplate/boilerplate.$1.txt {} > /tmp/boilerplate && mv /tmp/boilerplate {}"
5 changes: 5 additions & 0 deletions hack/boilerplate/boilerplate.go.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

4 changes: 4 additions & 0 deletions hack/boilerplate/boilerplate.sh.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

# Copyright 2021 The CloudEvents Authors
# SPDX-License-Identifier: Apache-2.0
3 changes: 3 additions & 0 deletions hack/build-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

# Copyright 2021 The CloudEvents Authors
# SPDX-License-Identifier: Apache-2.0

set -o errexit
set -o nounset

Expand Down
3 changes: 3 additions & 0 deletions hack/conformance-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

# Copyright 2021 The CloudEvents Authors
# SPDX-License-Identifier: Apache-2.0

set -o errexit
set -o nounset
set -o pipefail
Expand Down
3 changes: 3 additions & 0 deletions hack/integration-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

# Copyright 2021 The CloudEvents Authors
# SPDX-License-Identifier: Apache-2.0

set -o errexit
set -o nounset
set -o pipefail
Expand Down
3 changes: 3 additions & 0 deletions hack/tag-release.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

# Copyright 2021 The CloudEvents Authors
# SPDX-License-Identifier: Apache-2.0

set -o errexit
set -o nounset
set -o pipefail
Expand Down
3 changes: 3 additions & 0 deletions hack/unit-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

# Copyright 2021 The CloudEvents Authors
# SPDX-License-Identifier: Apache-2.0

set -o errexit
set -o nounset
set -o pipefail
Expand Down
5 changes: 5 additions & 0 deletions observability/opencensus/v2/client/client.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package client

import (
Expand Down
5 changes: 5 additions & 0 deletions observability/opencensus/v2/client/client_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package client

import (
Expand Down
5 changes: 5 additions & 0 deletions observability/opencensus/v2/client/observability_service.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package client

import (
Expand Down
5 changes: 5 additions & 0 deletions observability/opencensus/v2/client/observable.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package client

import (
Expand Down
5 changes: 5 additions & 0 deletions observability/opencensus/v2/client/reporter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package client

import (
Expand Down
5 changes: 5 additions & 0 deletions observability/opencensus/v2/client/trace_attributes.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package client

import (
Expand Down
5 changes: 5 additions & 0 deletions observability/opencensus/v2/http/http.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package http

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/amqp/v2/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

/*
Package amqp implements an AMQP binding using pack.ag/amqp module
*/
Expand Down
5 changes: 5 additions & 0 deletions protocol/amqp/v2/message.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package amqp

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/amqp/v2/message_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package amqp

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/amqp/v2/options.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package amqp

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/amqp/v2/protocol.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package amqp

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/amqp/v2/receiver.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package amqp

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/amqp/v2/sender.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package amqp

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/amqp/v2/types.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package amqp

import "github.com/cloudevents/sdk-go/v2/types"
Expand Down
5 changes: 5 additions & 0 deletions protocol/amqp/v2/write_message.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package amqp

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/kafka_sarama/v2/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

/*
Package kafka_sarama implements a Kafka binding using github.com/Shopify/sarama module
*/
Expand Down
5 changes: 5 additions & 0 deletions protocol/kafka_sarama/v2/message.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package kafka_sarama

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/kafka_sarama/v2/message_benchmark_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package kafka_sarama_test

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/kafka_sarama/v2/message_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package kafka_sarama_test

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/kafka_sarama/v2/option.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package kafka_sarama

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/kafka_sarama/v2/protocol.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package kafka_sarama

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/kafka_sarama/v2/receiver.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package kafka_sarama

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/kafka_sarama/v2/sender.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package kafka_sarama

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/kafka_sarama/v2/sender_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package kafka_sarama

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/kafka_sarama/v2/write_producer_message.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package kafka_sarama

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package kafka_sarama_test

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/kafka_sarama/v2/write_producer_message_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package kafka_sarama

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/nats/v2/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

/*
Package nats implements the CloudEvent transport implementation using NATS.
*/
Expand Down
5 changes: 5 additions & 0 deletions protocol/nats/v2/message.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package nats

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/nats/v2/options.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package nats

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/nats/v2/options_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package nats

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/nats/v2/protocol.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package nats

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/nats/v2/receiver.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package nats

import (
Expand Down
5 changes: 5 additions & 0 deletions protocol/nats/v2/sender.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/

package nats

import (
Expand Down
Loading