forked from AgoraIO/API-Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitee-sync-shell.sh
More file actions
executable file
·33 lines (26 loc) · 1.94 KB
/
gitee-sync-shell.sh
File metadata and controls
executable file
·33 lines (26 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
git config --global user.email "sync2gitee@example.com"
git config --global user.name "sync2gitee"
pwd
git remote -v
change android maven to china repos
sed -ie "s#google()#maven { url \"https\://maven.aliyun.com/repository/public\" }\n google()#g" Android/APIExample/settings.gradle
sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tencent.com/gradle#g" Android/APIExample/gradle/wrapper/gradle-wrapper.properties
sed -ie "s#google()#maven { url \"https\://maven.aliyun.com/repository/public\" }\n google()#g" Android/APIExample-Audio/settings.gradle
sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tencent.com/gradle#g" Android/APIExample-Audio/gradle/wrapper/gradle-wrapper.properties
git add Android/APIExample/settings.gradle Android/APIExample/gradle/wrapper/gradle-wrapper.properties Android/APIExample-Audio/settings.gradle Android/APIExample-Audio/gradle/wrapper/gradle-wrapper.properties
git commit -m '[Android] gitee sync >> use china repos.'
# change iOS Podfile to china repos
python3 .github/workflows/modify_podfile.py iOS/APIExample/Podfile
python3 .github/workflows/modify_podfile.py iOS/APIExample-Audio/Podfile
python3 .github/workflows/modify_podfile.py iOS/APIExample-OC/Podfile
python3 .github/workflows/modify_podfile.py macOS/Podfile
# sed -ie '1s#^#source "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"\n#' iOS/APIExample/Podfile
# sed -ie '1s#^#source "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"\n#' iOS/APIExample-Audio/Podfile
# sed -ie '1s#^#source "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"\n#' iOS/APIExample-OC/Podfile
# sed -ie '1s#^#source "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"\n#' macOS/Podfile
git add iOS/APIExample/Podfile iOS/APIExample-Audio/Podfile iOS/APIExample-OC/Podfile macOS/Podfile
git commit -m '[iOS] gitee sync >> use china repos.'
git branch
git status
git push gitee