Skip to content

Commit e265d24

Browse files
authored
1 parent ed97a1b commit e265d24

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,15 @@ docker run --rm \
4242
--output /output/resource.rs \
4343
--parameters conventions=resource
4444

45+
SED=(sed -i)
46+
if [[ "$(uname)" = "Darwin" ]]; then
47+
SED=(sed -i "")
48+
fi
49+
4550
# Keep `SCHEMA_URL` key in sync with spec version
46-
sed -i "s/\(opentelemetry.io\/schemas\/\)[^\"]*\"/\1$SPEC_VERSION\"/" src/lib.rs
51+
"${SED[@]}" "s/\(opentelemetry.io\/schemas\/\)[^\"]*\"/\1$SPEC_VERSION\"/" src/lib.rs
4752

4853
# handle doc generation failures
49-
sed -i 's/\[2\]\.$//' src/resource.rs # remove trailing [2] from few of the doc comments
54+
"${SED[@]}" 's/\[2\]\.$//' src/resource.rs # remove trailing [2] from few of the doc comments
5055

5156
cargo fmt

0 commit comments

Comments
 (0)