We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed97a1b commit e265d24Copy full SHA for e265d24
opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh
@@ -42,10 +42,15 @@ docker run --rm \
42
--output /output/resource.rs \
43
--parameters conventions=resource
44
45
+SED=(sed -i)
46
+if [[ "$(uname)" = "Darwin" ]]; then
47
+ SED=(sed -i "")
48
+fi
49
+
50
# Keep `SCHEMA_URL` key in sync with spec version
-sed -i "s/\(opentelemetry.io\/schemas\/\)[^\"]*\"/\1$SPEC_VERSION\"/" src/lib.rs
51
+"${SED[@]}" "s/\(opentelemetry.io\/schemas\/\)[^\"]*\"/\1$SPEC_VERSION\"/" src/lib.rs
52
53
# handle doc generation failures
-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
55
56
cargo fmt
0 commit comments