Skip to content

Commit

Permalink
license: removes copyright year and uses SPDX ID (#220)
Browse files Browse the repository at this point in the history
As a small project, we have to conserve resources and not sign up for work that isn't required. I've recently realized many commercial and/or CNCF projects both use SPDX IDs and also don't bother with copyright year. If their legal team is ok with this, surely a volunteer team without access to one, should be, too! Doing so accomplishes the following:

* significantly increases readability of files, particularly small ones
* removes beginning of year maintenance, which cause a lot of FUD last year. IIRC some deployment failed and hours were spent in spite of docs.
* eliminates the need to do a full source check out, just to satisfy the license plugin. This means we can use actions/checkout defaults.

Same as openzipkin/zipkin-reporter-java#257

Signed-off-by: Adrian Cole <adrian@tetrate.io>
  • Loading branch information
codefromthecrypt authored Apr 14, 2024
1 parent 2a1430a commit 61b5f7e
Show file tree
Hide file tree
Showing 86 changed files with 161 additions and 909 deletions.
15 changes: 3 additions & 12 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,8 @@ If you are adding a new file it should have a header like below. This
can be automatically added by running `./mvnw com.mycila:license-maven-plugin:format`.

```
/**
* Copyright 2019 The OpenZipkin Authors
*
* 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.
/*
* Copyright The OpenZipkin Authors
* SPDX-License-Identifier: Apache-2.0
*/
```
1 change: 0 additions & 1 deletion .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
# Prevent use of implicit GitHub Actions read-only GITHUB_TOKEN
# because maven-release-plugin pushes commits to master.
token: ${{ secrets.GH_TOKEN }}
fetch-depth: 1 # license check is skipped, so we don't need history
- name: Setup java
uses: actions/setup-java@v4
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ jobs:
# Prevent use of implicit GitHub Actions read-only GITHUB_TOKEN
# because javadoc_to_gh_pages pushes commits to the gh-pages branch.
token: ${{ secrets.GH_TOKEN }}
# allow build-bin/javadoc_to_gh_pages to get the full history
fetch-depth: 0
- name: Setup java
uses: actions/setup-java@v4
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/docker_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 1 # only needed to get the sha label
# Don't attempt to cache Docker. Sensitive information can be stolen
# via forks, and login session ends up in ~/.docker. This is ok because
# we publish DOCKER_PARENT_IMAGE to ghcr.io, hence local to the runner.
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # full git history for license check
- name: Setup java
uses: actions/setup-java@v4
with:
Expand Down
13 changes: 2 additions & 11 deletions .settings.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016-2020 The OpenZipkin Authors
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.
Copyright The OpenZipkin Authors
SPDX-License-Identifier: Apache-2.0
-->
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down
17 changes: 0 additions & 17 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,6 @@ Here's an example of a snapshot deploy with specified credentials.
$ export GPG_TTY=$(tty) && GPG_PASSPHRASE=whackamole SONATYPE_USER=adrianmole SONATYPE_PASSWORD=ed6f20bde9123bbb2312b221 build-bin/build-bin/maven/maven_deploy
```

## First release of the year

The license plugin verifies license headers of files include a copyright notice indicating the years a file was affected.
This information is taken from git history. There's a once-a-year problem with files that include version numbers (pom.xml).
When a release tag is made, it increments version numbers, then commits them to git. On the first release of the year,
further commands will fail due to the version increments invalidating the copyright statement. The way to sort this out is
the following:

Before you do the first release of the year, move the SNAPSHOT version back and forth from whatever the current is.
In-between, re-apply the licenses.
```bash
$ ./mvnw versions:set -DnewVersion=1.3.3-SNAPSHOT -DgenerateBackupPoms=false
$ ./mvnw com.mycila:license-maven-plugin:format
$ ./mvnw versions:set -DnewVersion=1.3.2-SNAPSHOT -DgenerateBackupPoms=false
$ git commit -am"Adjusts copyright headers for this year"
```

## Manually releasing

If for some reason, you lost access to CI or otherwise cannot get automation to work, bear in mind
Expand Down
13 changes: 2 additions & 11 deletions benchmarks/pom.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016-2024 The OpenZipkin Authors
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.
Copyright The OpenZipkin Authors
SPDX-License-Identifier: Apache-2.0
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
/*
* Copyright 2016-2024 The OpenZipkin Authors
*
* 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.
* Copyright The OpenZipkin Authors
* SPDX-License-Identifier: Apache-2.0
*/
package zipkin2.reporter.stackdriver;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
/*
* Copyright 2016-2024 The OpenZipkin Authors
*
* 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.
* Copyright The OpenZipkin Authors
* SPDX-License-Identifier: Apache-2.0
*/
package zipkin2.reporter.stackdriver.brave;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
/*
* Copyright 2016-2024 The OpenZipkin Authors
*
* 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.
* Copyright The OpenZipkin Authors
* SPDX-License-Identifier: Apache-2.0
*/
package zipkin2.reporter.stackdriver.zipkin;

Expand Down
4 changes: 0 additions & 4 deletions build-bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # full git history for license check
- name: Test
run: |
build-bin/configure_test
Expand Down Expand Up @@ -186,8 +184,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 1 # only needed to get the sha label
- name: Deploy
env:
GH_USER: ${{ secrets.GH_USER }}
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/configure_docker
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin Authors
#
# 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# Defends against build outages caused by Docker Hub (docker.io) pull rate limits.
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/configure_docker_push
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin Authors
#
# 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# Ensures Docker is logged in and it can build multi-architecture.
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/docker_arch
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin Authors
#
# 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# This script gets a normalized name for the architecture as used in Docker. This will be a subset
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/docker_args
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2024 The OpenZipkin Authors
#
# 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# This builds common docker arguments used by docker_build and docker_push.
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/docker_block_on_health
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin Authors
#
# 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# Blocks until a named docker container with a valid HEALTHCHECK instruction is healthy or not:
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/docker_build
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin Authors
#
# 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

set -ue
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/docker_push
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin Authors
#
# 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# This script pushes images to GitHub Container Registry (ghcr.io).
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/docker_test_image
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin Authors
#
# 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# Tests a an image by awaiting its HEALTHCHECK.
Expand Down
13 changes: 2 additions & 11 deletions build-bin/git/login_git
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin Authors
#
# 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

set -ue
Expand Down
13 changes: 2 additions & 11 deletions build-bin/git/version_from_trigger_tag
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin Authors
#
# 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.
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# This script echos a `MAJOR.MINOR.PATCH` version tag based on..
Expand Down
Loading

0 comments on commit 61b5f7e

Please sign in to comment.