Skip to content

Commit 4e45c13

Browse files
authored
[CI] adjust-pages: report obsolete patch-code as INFO msgs (#5587)
1 parent 416e4ed commit 4e45c13

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scripts/content-modules/adjust-pages.pl

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
my $otelSpecVers = $versions{'spec:'};
2626
my $otlpSpecVers = $versions{'otlp:'};
2727
my $semconvVers = $versions{'semconv:'};
28-
my $warn2 = 0; # TODO remove along with warning 002
28+
my $patchMsg2 = 0; # TODO remove along with patch-message 002
2929

3030
sub printTitleAndFrontMatter() {
3131
print "---\n";
@@ -46,7 +46,7 @@ ()
4646
} elsif ($ARGV =~ /otel\/specification\/logs\/api.md$/) {
4747
if ($otelSpecVers ne "1.39.0") {
4848
# TODO: delete the enclosing elsif body
49-
print STDOUT "WARNING [001]: $0: remove obsolete code now that OTel spec has been updated.\n"
49+
print STDOUT "INFO [001]: $0: remove obsolete code now that OTel spec has been updated.\n"
5050
}
5151
$frontMatterFromFile .= "linkTitle: API\naliases: [bridge-api]\n";
5252
}
@@ -116,13 +116,13 @@ ()
116116

117117
# SPECIFICATION custom processing
118118

119-
# TODO: drop the entire if-then-else statement patch code when OTel spec vers contains
119+
# TODO: drop the entire if statement patch code when OTel spec vers contains
120120
# https://github.com/open-telemetry/opentelemetry-specification/pull/4287,
121121
# which should be vers > 1.39.0.
122-
if ($otelSpecVers eq "1.39.0") {
122+
if ($ARGV =~ /otel\/spec/) {
123123
s|(/api\.md)#logs-api\b|$1|g;
124-
} elsif ($ARGV =~ /otel\/spec/) {
125-
print STDOUT "WARNING [002]: $0: remove obsolete code now that OTel spec has been updated.\n" unless $warn2++
124+
print STDOUT "INFO [002]: $0: remove obsolete patch code now that OTel spec has been updated.\n"
125+
if $otelSpecVers ne "1.39.0" && !$patchMsg2++
126126
}
127127

128128
s|\(https://github.com/open-telemetry/opentelemetry-specification\)|($specBasePath/otel/)|;

0 commit comments

Comments
 (0)