-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support 3.7.2.4 without new APIs (#643)
* chore: optimize * chore: optimize * chore: optimize * chore: optimize * chore: optimize * chore: optimize * chore: optimize * chore: optimize * chore: optimize * chore: optimize * chore: optimize * chore: optimize * chore: optimize * chore: optimize * chore: optimize
- Loading branch information
1 parent
0f41a73
commit 11c514f
Showing
21 changed files
with
557 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/sh | ||
|
||
if [ "$LEFTHOOK" = "0" ]; then | ||
exit 0 | ||
fi | ||
|
||
if [ -t 1 ] ; then | ||
exec < /dev/tty ; # <- enables interactive shell | ||
fi | ||
|
||
dir="$(git rev-parse --show-toplevel)" | ||
|
||
call_lefthook() | ||
{ | ||
if lefthook -h >/dev/null 2>&1 | ||
then | ||
eval lefthook $@ | ||
elif test -f "$dir/node_modules/@arkweid/lefthook/bin/lefthook" | ||
then | ||
eval "$dir/node_modules/@arkweid/lefthook/bin/lefthook $@" | ||
elif bundle exec lefthook -h >/dev/null 2>&1 | ||
then | ||
bundle exec lefthook $@ | ||
elif npx @arkweid/lefthook -h >/dev/null 2>&1 | ||
then | ||
npx @arkweid/lefthook $@ | ||
elif yarn lefthook -h >/dev/null 2>&1 | ||
then | ||
yarn lefthook $@ | ||
else | ||
echo "Can't find lefthook in PATH" | ||
fi | ||
} | ||
|
||
|
||
|
||
call_lefthook "run commit-msg $@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/sh | ||
|
||
if [ "$LEFTHOOK" = "0" ]; then | ||
exit 0 | ||
fi | ||
|
||
if [ -t 1 ] ; then | ||
exec < /dev/tty ; # <- enables interactive shell | ||
fi | ||
|
||
dir="$(git rev-parse --show-toplevel)" | ||
|
||
call_lefthook() | ||
{ | ||
if lefthook -h >/dev/null 2>&1 | ||
then | ||
eval lefthook $@ | ||
elif test -f "$dir/node_modules/@arkweid/lefthook/bin/lefthook" | ||
then | ||
eval "$dir/node_modules/@arkweid/lefthook/bin/lefthook $@" | ||
elif bundle exec lefthook -h >/dev/null 2>&1 | ||
then | ||
bundle exec lefthook $@ | ||
elif npx @arkweid/lefthook -h >/dev/null 2>&1 | ||
then | ||
npx @arkweid/lefthook $@ | ||
elif yarn lefthook -h >/dev/null 2>&1 | ||
then | ||
yarn lefthook $@ | ||
else | ||
echo "Can't find lefthook in PATH" | ||
fi | ||
} | ||
|
||
|
||
|
||
call_lefthook "run pre-commit $@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/sh | ||
|
||
if [ "$LEFTHOOK" = "0" ]; then | ||
exit 0 | ||
fi | ||
|
||
if [ -t 1 ] ; then | ||
exec < /dev/tty ; # <- enables interactive shell | ||
fi | ||
|
||
dir="$(git rev-parse --show-toplevel)" | ||
|
||
call_lefthook() | ||
{ | ||
if lefthook -h >/dev/null 2>&1 | ||
then | ||
eval lefthook $@ | ||
elif test -f "$dir/node_modules/@arkweid/lefthook/bin/lefthook" | ||
then | ||
eval "$dir/node_modules/@arkweid/lefthook/bin/lefthook $@" | ||
elif bundle exec lefthook -h >/dev/null 2>&1 | ||
then | ||
bundle exec lefthook $@ | ||
elif npx @arkweid/lefthook -h >/dev/null 2>&1 | ||
then | ||
npx @arkweid/lefthook $@ | ||
elif yarn lefthook -h >/dev/null 2>&1 | ||
then | ||
yarn lefthook $@ | ||
else | ||
echo "Can't find lefthook in PATH" | ||
fi | ||
} | ||
|
||
# lefthook_version: 9df6c1f1f0b607d16db43f25a405e842 | ||
|
||
call_lefthook "install" | ||
|
||
call_lefthook "run prepare-commit-msg $@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Setup | ||
description: Setup Node.js and install dependencies | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: .nvmrc | ||
|
||
- name: Cache dependencies | ||
id: yarn-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: | | ||
yarn install --frozen-lockfile | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 60 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- pinned | ||
- security | ||
# Label to use when marking an issue as stale | ||
staleLabel: wontfix | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
name: Build API Example | ||
run-name: ${{ github.actor }} triggered this job | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build-android: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: SetupExample | ||
run: | | ||
yarn install --frozen-lockfile | ||
working-directory: example | ||
|
||
- name: Modify APP ID | ||
run: | | ||
sed "s/\"appId\": \(.*\),/\"appId\": \"${{ secrets.APP_ID }}\",/g" agora.config.json > tmp | ||
mv tmp agora.config.json | ||
working-directory: example/src/config | ||
|
||
- name: Gradle build | ||
run: | | ||
./gradlew :app:assembleRelease | ||
working-directory: example/android | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: AgoraRtcExample | ||
path: | | ||
example/android/**/*.apk | ||
build-ios: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: example/ios/Pods | ||
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-pods- | ||
- name: SetupExample | ||
run: | | ||
yarn | ||
- name: Modify APP ID | ||
run: | | ||
sed "s/\"appId\": \(.*\),/\"appId\": \"${{ secrets.APP_ID }}\",/g" agora.config.json > tmp | ||
mv tmp agora.config.json | ||
working-directory: example/src/config | ||
|
||
- name: Install the Apple certificate and provisioning profile | ||
env: | ||
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} | ||
P12_PASSWORD: ${{ secrets.P12_PASSWORD }} | ||
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }} | ||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | ||
run: | | ||
# create variables | ||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | ||
PP_PATH=$RUNNER_TEMP/${{ secrets.BUILD_PROVISION_PROFILE_UUID }}.mobileprovision | ||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | ||
# import certificate and provisioning profile from secrets | ||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH | ||
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_PATH | ||
# create temporary keychain | ||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | ||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | ||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | ||
# import certificate to keychain | ||
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | ||
security list-keychain -d user -s $KEYCHAIN_PATH | ||
# apply provisioning profile | ||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | ||
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles | ||
- uses: hendrikmuhs/[email protected] | ||
with: | ||
max-size: 5G | ||
|
||
- name: Fastlane build | ||
env: | ||
CC: clang | ||
CXX: clang++ | ||
CLANG: clang | ||
CLANGPLUSPLUS: clang++ | ||
LD: clang | ||
LDPLUSPLUS: clang++ | ||
CCACHE_SLOPPINESS: clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros | ||
CCACHE_FILECLONE: true | ||
CCACHE_DEPEND: true | ||
CCACHE_INODECACHE: true | ||
run: | | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
fastlane gym --export_method "development" --export_options "{\"compileBitcode\":false}" | ||
working-directory: example/ios | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: AgoraRtcExample | ||
path: | | ||
example/ios/*.ipa | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: AgoraRtcExampleSymbol | ||
path: | | ||
example/ios/*.dSYM.zip | ||
notification: | ||
runs-on: ubuntu-latest | ||
needs: [ build-android, build-ios ] | ||
steps: | ||
- run: | | ||
curl -X POST "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${{ secrets.WECHAT_KEY }}" -d '{"msgtype":"text","text":{"content":"ReactNative:\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Publish to NPM | ||
run-name: ${{ github.actor }} triggered this job | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
increment: | ||
description: 'Increment "major", "minor", "patch", or "pre*" version; or specify version [default: "patch"]' | ||
required: true | ||
default: 'patch' | ||
type: string | ||
dry-run: | ||
description: 'Do not touch or write anything, but show the commands' | ||
default: true | ||
type: boolean | ||
|
||
jobs: | ||
release-it: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Setup NPM auth token | ||
run: | | ||
npm set "//registry.npmjs.org/:_authToken" ${{ secrets.NPM_TOKEN }} | ||
- if: ${{ inputs.dry-run }} | ||
run: | | ||
yarn release ${{ inputs.increment }} -d --ci | ||
- if: ${{ !inputs.dry-run }} | ||
run: | | ||
git config --global user.email "${{ secrets.GIT_EMAIL }}" | ||
git config --global user.name "${{ secrets.GIT_USERNAME }}" | ||
yarn release ${{ inputs.increment }} --ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
16.18.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.7.4 |
Oops, something went wrong.