|
16 | 16 | set -eu |
17 | 17 | here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
18 | 18 |
|
| 19 | +function replace_acceptable_years() { |
| 20 | + # this needs to replace all acceptable forms with 'YEARS' |
| 21 | + sed -e 's/20[12][0-9]-20[12][0-9]/YEARS/' -e 's/2019/YEARS/' -e 's/2020/YEARS/' |
| 22 | +} |
| 23 | + |
19 | 24 | printf "=> Checking linux tests... " |
20 | 25 | FIRST_OUT="$(git status --porcelain)" |
21 | 26 | ruby "$here/../scripts/generate_linux_tests.rb" > /dev/null |
@@ -58,7 +63,7 @@ for language in swift-or-c bash dtrace; do |
58 | 63 | // |
59 | 64 | // This source file is part of the AsyncHTTPClient open source project |
60 | 65 | // |
61 | | -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors |
| 66 | +// Copyright (c) YEARS Apple Inc. and the AsyncHTTPClient project authors |
62 | 67 | // Licensed under Apache License v2.0 |
63 | 68 | // |
64 | 69 | // See LICENSE.txt for license information |
|
77 | 82 | ## |
78 | 83 | ## This source file is part of the AsyncHTTPClient open source project |
79 | 84 | ## |
80 | | -## Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors |
| 85 | +## Copyright (c) YEARS Apple Inc. and the AsyncHTTPClient project authors |
81 | 86 | ## Licensed under Apache License v2.0 |
82 | 87 | ## |
83 | 88 | ## See LICENSE.txt for license information |
|
96 | 101 | * |
97 | 102 | * This source file is part of the AsyncHTTPClient open source project |
98 | 103 | * |
99 | | - * Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors |
| 104 | + * Copyright (c) YEARS Apple Inc. and the AsyncHTTPClient project authors |
100 | 105 | * Licensed under Apache License v2.0 |
101 | 106 | * |
102 | 107 | * See LICENSE.txt for license information |
|
121 | 126 | \( \! -path './.build/*' -a \ |
122 | 127 | \( "${matching_files[@]}" \) -a \ |
123 | 128 | \( \! \( "${exceptions[@]}" \) \) \) | while read line; do |
124 | | - if [[ "$(cat "$line" | head -n $expected_lines | shasum)" != "$expected_sha" ]]; then |
| 129 | + if [[ "$(cat "$line" | replace_acceptable_years | head -n $expected_lines | shasum)" != "$expected_sha" ]]; then |
125 | 130 | printf "\033[0;31mmissing headers in file '$line'!\033[0m\n" |
126 | | - diff -u <(cat "$line" | head -n $expected_lines) "$tmp" |
| 131 | + diff -u <(cat "$line" | replace_acceptable_years | head -n $expected_lines) "$tmp" |
127 | 132 | exit 1 |
128 | 133 | fi |
129 | 134 | done |
|
0 commit comments