Skip to content

Commit ea9b4a9

Browse files
committed
Ensure that spec front matter redirect path gets patched too
1 parent a78c36e commit ea9b4a9

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

scripts/content-modules/adjust-pages.pl

+13-5
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ ($$)
7272
if $specVersTest && !$patchMsgCount{$patchID}++;
7373
}
7474

75+
sub patchAttrNaming($$) {
76+
my ($ARGV, $__) = @_;
77+
$_ = $__;
78+
my $semconv_attr_naming = '(/docs/specs/semconv/general)/naming/';
79+
if ($ARGV =~ /^tmp\/otel\/specification/ && /$semconv_attr_naming/) {
80+
s|$semconv_attr_naming|$1/attribute-naming/|g;
81+
printPatchInfoIf("2025-01-22-attribute-naming", $semconvVers ne "1.29.0");
82+
}
83+
return $_;
84+
}
85+
7586
# main
7687

7788
while(<>) {
@@ -84,6 +95,7 @@ ($$)
8495
if (/^<!---? Hugo/) {
8596
while(<>) {
8697
last if /^-?-->/;
98+
$_ = patchAttrNaming($ARGV, $_); # TEMPORARY patch
8799
$frontMatterFromFile .= $_;
88100
}
89101
next;
@@ -137,11 +149,7 @@ ($$)
137149
printPatchInfoIf("2025-01-22-attribute-naming.md", $semconvVers ne "1.29.0");
138150
}
139151

140-
my $semconv_attr_naming = '(/docs/specs/semconv/general)/naming/';
141-
if ($ARGV =~ /^tmp\/otel\/specification/ && /$semconv_attr_naming/) {
142-
s|$semconv_attr_naming|$1/attribute-naming/|g;
143-
printPatchInfoIf("2025-01-22-attribute-naming", $semconvVers ne "1.29.0");
144-
}
152+
$_ = patchAttrNaming($ARGV, $_); # TEMPORARY patch
145153

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

0 commit comments

Comments
 (0)