Skip to content

Commit 72bf1f6

Browse files
committed
Make git-monorepo-usage-trick work in CI in docker on linux
1 parent 1980c31 commit 72bf1f6

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

‎git-monorepo-usage-trick‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@
55
# `from "bs-react-native*` to `from "bs-react-native/bs-react-native*`
66
# only necessary when you are using git repo as a dep
77

8-
sed -i '' -e 's/require("bs-react-native\//require("bs-react-native\/bs-react-native\//g' $1
9-
sed -i '' -e 's/from "bs-react-native\//from "bs-react-native\/bs-react-native\//g' $1
10-
sed -i '' -e 's/require("bs-react-native-next\//require("bs-react-native\/bs-react-native-next\//g' $1
11-
sed -i '' -e 's/from "bs-react-native-next\//from "bs-react-native\/bs-react-native-next\//g' $1
8+
# sed -i does not work in CI in a docker image on Linux, so let's use ex instead.
9+
ex $1 <<EOF
10+
%s/require("bs-react-native\//require("bs-react-native\/bs-react-native\//g
11+
%s/from "bs-react-native\//from "bs-react-native\/bs-react-native\//g
12+
%s/require("bs-react-native-next\//require("bs-react-native\/bs-react-native-next\//g
13+
%s/from "bs-react-native-next\//from "bs-react-native\/bs-react-native-next\//g
14+
x
15+
EOF
16+
17+
# ex will exit with code 1 if not all the strings are found...
18+
exit 0

0 commit comments

Comments
 (0)