|
@@ -13,9 +13,28 @@
|
|
##
|
|
##
|
|
##===----------------------------------------------------------------------===##
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
|
|
|
|
+##===----------------------------------------------------------------------===##
|
|
|
|
+##
|
|
|
|
+## This source file is part of the SwiftNIO open source project
|
|
|
|
+##
|
|
|
|
+## Copyright (c) 2017-2019 Apple Inc. and the SwiftNIO project authors
|
|
|
|
+## Licensed under Apache License v2.0
|
|
|
|
+##
|
|
|
|
+## See LICENSE.txt for license information
|
|
|
|
+## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
|
|
+##
|
|
|
|
+## SPDX-License-Identifier: Apache-2.0
|
|
|
|
+##
|
|
|
|
+##===----------------------------------------------------------------------===##
|
|
|
|
+
|
|
set -eu
|
|
set -eu
|
|
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
|
|
|
+function replace_acceptable_years() {
|
|
|
|
+ # this needs to replace all acceptable forms with 'YEARS'
|
|
|
|
+ sed -e 's/2018-2019/YEARS/' -e 's/2019/YEARS/'
|
|
|
|
+}
|
|
|
|
+
|
|
printf "=> Checking linux tests... "
|
|
printf "=> Checking linux tests... "
|
|
FIRST_OUT="$(git status --porcelain)"
|
|
FIRST_OUT="$(git status --porcelain)"
|
|
ruby "$here/../scripts/generate_linux_tests.rb" > /dev/null
|
|
ruby "$here/../scripts/generate_linux_tests.rb" > /dev/null
|
|
@@ -45,7 +64,7 @@ for language in swift-or-c bash dtrace; do
|
|
//
|
|
//
|
|
// This source file is part of the Swift Logging API open source project
|
|
// This source file is part of the Swift Logging API open source project
|
|
//
|
|
//
|
|
-// Copyright (c) 2018-2019 Apple Inc. and the Swift Logging API project authors
|
|
|
|
|
|
+// Copyright (c) YEARS Apple Inc. and the Swift Logging API project authors
|
|
// Licensed under Apache License v2.0
|
|
// Licensed under Apache License v2.0
|
|
//
|
|
//
|
|
// See LICENSE.txt for license information
|
|
// See LICENSE.txt for license information
|
|
@@ -64,7 +83,7 @@ EOF
|
|
##
|
|
##
|
|
## This source file is part of the Swift Logging API open source project
|
|
## This source file is part of the Swift Logging API open source project
|
|
##
|
|
##
|
|
-## Copyright (c) 2018-2019 Apple Inc. and the Swift Logging API project authors
|
|
|
|
|
|
+## Copyright (c) YEARS Apple Inc. and the Swift Logging API project authors
|
|
## Licensed under Apache License v2.0
|
|
## Licensed under Apache License v2.0
|
|
##
|
|
##
|
|
## See LICENSE.txt for license information
|
|
## See LICENSE.txt for license information
|
|
@@ -83,7 +102,7 @@ EOF
|
|
*
|
|
*
|
|
* This source file is part of the Swift Logging API open source project
|
|
* This source file is part of the Swift Logging API open source project
|
|
*
|
|
*
|
|
- * Copyright (c) 2018-2019 Apple Inc. and the Swift Logging API project authors
|
|
|
|
|
|
+ * Copyright (c) YEARS Apple Inc. and the Swift Logging API project authors
|
|
* Licensed under Apache License v2.0
|
|
* Licensed under Apache License v2.0
|
|
*
|
|
*
|
|
* See LICENSE.txt for license information
|
|
* See LICENSE.txt for license information
|
|
@@ -108,9 +127,9 @@ EOF
|
|
\( \! -path './.build/*' -a \
|
|
\( \! -path './.build/*' -a \
|
|
\( "${matching_files[@]}" \) -a \
|
|
\( "${matching_files[@]}" \) -a \
|
|
\( \! \( "${exceptions[@]}" \) \) \) | while read line; do
|
|
\( \! \( "${exceptions[@]}" \) \) \) | while read line; do
|
|
- if [[ "$(cat "$line" | head -n $expected_lines | shasum)" != "$expected_sha" ]]; then
|
|
|
|
|
|
+ if [[ "$(cat "$line" | replace_acceptable_years | head -n $expected_lines | shasum)" != "$expected_sha" ]]; then
|
|
printf "\033[0;31mmissing headers in file '$line'!\033[0m\n"
|
|
printf "\033[0;31mmissing headers in file '$line'!\033[0m\n"
|
|
- diff -u <(cat "$line" | head -n $expected_lines) "$tmp"
|
|
|
|
|
|
+ diff -u <(cat "$line" | replace_acceptable_years | head -n $expected_lines) "$tmp"
|
|
exit 1
|
|
exit 1
|
|
fi
|
|
fi
|
|
done
|
|
done
|