Skip to content

Commit 6325853

Browse files
committed
Add script to update copyright end date
This adds a script to be used to update the copyrights in all source files so that its end date is '-present' rather than a specific year. Also does the following copyright related cleanup: - Removes the copyright from the docs. - Removes the Gradle update-copyrights.gradle script that kept the end date up-to-date (no longer needed w/ end date set to '-present'). - Updates the copyright in NOTICE.txt to use '-present' end date. - Removes the unused `src/dist/notice.txt` Signed-off-by: Chris Bono <[email protected]>
1 parent 070f747 commit 6325853

File tree

8 files changed

+18
-80
lines changed

8 files changed

+18
-80
lines changed

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ description = 'Spring for Apache Pulsar'
1111

1212
apply from: 'gradle/jacoco-conventions.gradle'
1313
apply from: 'gradle/aggregate-jacoco-report.gradle'
14-
apply from: 'gradle/update-copyrights.gradle'
1514
apply from: 'gradle/version-catalog-update.gradle'
1615
apply from: 'gradle/java-conventions.gradle'
1716

buildSrc/src/main/resources/NOTICE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Spring Pulsar ${version}
2-
Copyright (c) 2022-2023 Pivotal, Inc.
2+
Copyright (c) 2022-present Pivotal, Inc.
33

44
This product is licensed to you under the Apache License, Version 2.0
55
(the "License"). You may not use this product except in compliance with

gradle/update-copyrights.gradle

Lines changed: 0 additions & 61 deletions
This file was deleted.

spring-pulsar-docs/src/main/antora/modules/ROOT/pages/index.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ include::attributes/attributes.adoc[]
55
include::overview/authors.adoc[]
66
(v{spring-pulsar-version})
77

8-
include::overview/copyright.adoc[]
9-
108
ifeval::[{is-snapshot-version} == true]
119
CAUTION: You are viewing documentation for a SNAPSHOT version ({spring-pulsar-version}). While it is usually in-sync with the underlying code, it is subject to change and not guaranteed to be up-to-date with the underlying code.
1210
endif::[]

spring-pulsar-docs/src/main/antora/modules/ROOT/pages/overview/copyright.adoc

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/checkstyle/checkstyle-header.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
^\Q/*\E$
2-
^\Q * Copyright \E20\d\d(\-20\d\d)?\Q the original author or authors.\E$
2+
^\Q * Copyright \E20\d\d\-present\Q the original author or authors.\E$
33
^\Q *\E$
44
^\Q * Licensed under the Apache License, Version 2.0 (the "License");\E$
55
^\Q * you may not use this file except in compliance with the License.\E$

src/dist/notice.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
#
3+
# This shell script updates the copyright headers in source code files
4+
# in the current branch so that the headers conform to the pattern:
5+
# <start-year>-present.
6+
#
7+
# For example, "Copyright 2002-2025" will be replaced with
8+
# "Copyright 2002-current".
9+
#
10+
# This has only been tested on mac OS.
11+
12+
echo Updating copyright headers in Java, Kotlin, and Groovy source code
13+
14+
for file in $(find -E . -type f -regex '.+\.(java|kt|groovy)$' | uniq); do
15+
sed -i '' -E "s/Copyright ([0-9]{4})-[0-9]{4}/Copyright \1-present/g" $file;
16+
done

0 commit comments

Comments
 (0)