Skip to content

Commit b3bf36e

Browse files
authored
[CI] Ensure spec processing works even if path contains a space (#5422)
1 parent ebd4457 commit b3bf36e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

scripts/content-modules/adjust-pages.pl

+6-6
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ ()
127127
# Images
128128
s|(\.\./)?internal(/img/[-\w]+\.png)|$2|g;
129129
s|(\]\()(img/.*?\))|$1../$2|g if $ARGV !~ /(logs|schemas)._index/ && $ARGV !~ /otlp\/docs/;
130-
s|(\]\()([^)]+\.png\))|$1../$2|g if $ARGV =~ /\/tmp\/semconv\/docs\/general\/attributes/;
131-
s|(\]\()([^)]+\.png\))|$1../$2|g if $ARGV =~ /\/tmp\/semconv\/docs\/http\/http-spans/;
130+
s|(\]\()([^)]+\.png\))|$1../$2|g if $ARGV =~ /\btmp\/semconv\/docs\/general\/attributes/;
131+
s|(\]\()([^)]+\.png\))|$1../$2|g if $ARGV =~ /\btmp\/semconv\/docs\/http\/http-spans/;
132132

133133
s|\.\.\/README.md\b|$otelSpecRepoUrl/|g if $ARGV =~ /specification._index/;
134134
s|\.\.\/README.md\b|..| if $ARGV =~ /specification.library-guidelines.md/;
135135

136-
s|\.\./(opentelemetry/proto/?.*)|$otlpSpecRepoUrl/tree/v$otlpSpecVers/$1|g if $ARGV =~ /\/tmp\/otlp/;
137-
s|\.\./README.md\b|$otlpSpecRepoUrl/|g if $ARGV =~ /\/tmp\/otlp/;
138-
s|\.\./examples/README.md\b|$otlpSpecRepoUrl/tree/v$otlpSpecVers/examples/|g if $ARGV =~ /\/tmp\/otlp/;
136+
s|\.\./(opentelemetry/proto/?.*)|$otlpSpecRepoUrl/tree/v$otlpSpecVers/$1|g if $ARGV =~ /\btmp\/otlp/;
137+
s|\.\./README.md\b|$otlpSpecRepoUrl/|g if $ARGV =~ /\btmp\/otlp/;
138+
s|\.\./examples/README.md\b|$otlpSpecRepoUrl/tree/v$otlpSpecVers/examples/|g if $ARGV =~ /\btmp\/otlp/;
139139

140140
s|\bREADME.md\b|_index.md|g if $ARGV !~ /otel\/specification\/protocol\/_index.md/;
141141

@@ -144,7 +144,7 @@ ()
144144
s|(\.\.\/)+(supplementary-guidelines\/compatibility\/[^)]+)|$otelSpecRepoUrl/tree/v$otelSpecVers/$2|g;
145145

146146
# Rewrite inline links
147-
if ($ARGV =~ /\/tmp\/opamp/) {
147+
if ($ARGV =~ /\btmp\/opamp/) {
148148
s|\]\(([^:\)]*?)\.md((#.*?)?)\)|]($1/$2)|g;
149149
} else {
150150
s|\]\(([^:\)]*?\.md(#.*?)?)\)|]({{% relref "$1" %}})|g;

scripts/content-modules/cp-pages.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

3-
SCRIPT_DIR="$(cd `dirname $0`; pwd)"
4-
DEST_BASE="$(cd $SCRIPT_DIR; cd ../../; pwd)/tmp"
3+
SCRIPT_DIR=$(dirname $0)
4+
DEST_BASE=tmp
55

66
## OTel specification
77

0 commit comments

Comments
 (0)