Skip to content

Commit

Permalink
[MIRROR]script for gitee (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe authored Mar 21, 2024
1 parent 5311402 commit 617742b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions scripts/mirror.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -e
set -x
MY_PATH=$(realpath $(dirname "$0"))
PROJECT_ROOT=$(realpath ${MY_PATH}/..)

LINE="npmRegistryServer: https://registry.npmmirror.com"
if ! grep -q "$LINE" ${PROJECT_ROOT}/.yarnrc.yml; then
sed -i "" "1i\\
$LINE
" ${PROJECT_ROOT}/.yarnrc.yml
fi

sed -i "" 's#"react-native-agora-rawdata": "github:AgoraLibrary/react-native-agora-rawdata"#"react-native-agora-rawdata": "git+https://gitee.com/agoraio-community/react-native-agora-rawdata.git"#g' ${PROJECT_ROOT}/example/package.json
sed -i "" 's#"react-native-image-tool": "github:LichKing-2234/react-native-image-tools"#"react-native-image-tool": "git+https://gitee.com/agoraio-community/react-native-image-tools.git"#g' ${PROJECT_ROOT}/example/package.json

0 comments on commit 617742b

Please sign in to comment.