react-native-insider 5.0.2-nh → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/CODEOWNERS +1 -1
- package/.github/workflows/dependabot_workflow.yml +1 -1
- package/.github/workflows/react-native-insider_release.yml +63 -0
- package/.github/workflows/release_task_merger.yml +22 -0
- package/.github/workflows/release_version_setter.yml +41 -0
- package/RNInsider.podspec +2 -2
- package/android/build.gradle +11 -8
- package/android/src/main/java/com/useinsider/react/RNInsiderModule.java +4 -0
- package/changelog/5.0.2.md +2 -2
- package/package.json +1 -1
- package/release_version.sh +30 -0
- package/slack_notifier.sh +19 -0
- package/.github/workflows/master_release_with_tag.yml +0 -59
- package/.github/workflows/new_release.yml +0 -58
package/.github/CODEOWNERS
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: React Native Insider Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version_name:
|
|
7
|
+
required: true
|
|
8
|
+
description: The new version name of the SDK to be released (5.0.2)
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release:
|
|
12
|
+
if: github.actor == 'sonerdm' || github.actor == 'melih-useinsider'
|
|
13
|
+
name: Create Release
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v3
|
|
19
|
+
with:
|
|
20
|
+
ref: develop
|
|
21
|
+
|
|
22
|
+
- name: Setup node
|
|
23
|
+
uses: actions/setup-node@v3.2.0
|
|
24
|
+
with:
|
|
25
|
+
node-version: 12
|
|
26
|
+
registry-url: https://registry.npmjs.org/
|
|
27
|
+
|
|
28
|
+
- name: Publish RN SDK
|
|
29
|
+
run: |
|
|
30
|
+
npm ci
|
|
31
|
+
npm test
|
|
32
|
+
npm publish
|
|
33
|
+
text=":atom_symbol: React Native SDK is published with version: ${{ github.event.inputs.version_name }}"
|
|
34
|
+
./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
|
|
35
|
+
env:
|
|
36
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
37
|
+
|
|
38
|
+
release-nh:
|
|
39
|
+
needs: release
|
|
40
|
+
name: Create NH Release
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
|
|
43
|
+
steps:
|
|
44
|
+
- name: Checkout code
|
|
45
|
+
uses: actions/checkout@v3
|
|
46
|
+
with:
|
|
47
|
+
ref: develop-nh
|
|
48
|
+
|
|
49
|
+
- name: Setup node
|
|
50
|
+
uses: actions/setup-node@v3.2.0
|
|
51
|
+
with:
|
|
52
|
+
node-version: 12
|
|
53
|
+
registry-url: https://registry.npmjs.org/
|
|
54
|
+
|
|
55
|
+
- name: Publish RN NH SDK
|
|
56
|
+
run: |
|
|
57
|
+
npm ci
|
|
58
|
+
npm test
|
|
59
|
+
npm publish
|
|
60
|
+
text=":atom_symbol: React Native NH SDK is published with version: ${{ github.event.inputs.version_name }}-nh"
|
|
61
|
+
./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
|
|
62
|
+
env:
|
|
63
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Release Task Merger
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version_name:
|
|
7
|
+
required: true
|
|
8
|
+
description: The new version name of the SDK to be released (5.0.2)
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
sdk_releaser:
|
|
12
|
+
if: github.actor == 'sonerdm' || github.actor == 'melih-useinsider'
|
|
13
|
+
name: Trigger mobile-devops repository task merger
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Repository Dispatch
|
|
17
|
+
uses: peter-evans/repository-dispatch@v1
|
|
18
|
+
with:
|
|
19
|
+
token: ${{ secrets.GIT_TOKEN }}
|
|
20
|
+
repository: useinsider/mobile-devops
|
|
21
|
+
event-type: sdk-release-module
|
|
22
|
+
client-payload: '{"repo-name": "react-native-insider", "sdk_version_name": "${{ github.event.inputs.version_name }}"}'
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Release Version Setter
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
repository_dispatch:
|
|
5
|
+
types: [trigger-release-version-setter]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
release_version_setter:
|
|
9
|
+
name: Run Version Setter
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout code
|
|
13
|
+
uses: actions/checkout@v3
|
|
14
|
+
with:
|
|
15
|
+
ref: develop
|
|
16
|
+
|
|
17
|
+
- name: Configure AWS credentials
|
|
18
|
+
uses: aws-actions/configure-aws-credentials@v1
|
|
19
|
+
with:
|
|
20
|
+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
21
|
+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
22
|
+
aws-region: eu-west-1
|
|
23
|
+
|
|
24
|
+
- name: Run release_version.sh
|
|
25
|
+
run: |
|
|
26
|
+
./release_version.sh ${{ github.event.client_payload.sdk_version_name }}
|
|
27
|
+
|
|
28
|
+
- name: Push changes to develop
|
|
29
|
+
run: |
|
|
30
|
+
git config --global user.name 'sonerdm'
|
|
31
|
+
git config --global user.email 'soner@useinsider.com'
|
|
32
|
+
git remote set-url origin https://x-access-token:${{ secrets.GIT_TOKEN }}@github.com/${{ github.repository }}
|
|
33
|
+
git commit -am "Release version ${{ github.event.client_payload.sdk_version_name }}"
|
|
34
|
+
git push
|
|
35
|
+
env:
|
|
36
|
+
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
|
|
37
|
+
|
|
38
|
+
- name: Notify QAs
|
|
39
|
+
run: |
|
|
40
|
+
text=":tatakae: React Native SDK is ready to test with version: ${{ github.event.client_payload.sdk_version_name }} <!subteam^SUUGFQNVA|mobileqa>"
|
|
41
|
+
./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
|
package/RNInsider.podspec
CHANGED
|
@@ -9,11 +9,11 @@ Pod::Spec.new do |s|
|
|
|
9
9
|
s.authors = package_json['author']
|
|
10
10
|
s.license = 'MIT'
|
|
11
11
|
s.platform = :ios, '10.0'
|
|
12
|
-
s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/12.
|
|
12
|
+
s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/12.4.0/InsiderMobileIOSFramework.zip'}
|
|
13
13
|
s.source_files = 'ios/RNInsider/*.{h,m}'
|
|
14
14
|
s.requires_arc = true
|
|
15
15
|
s.static_framework = true
|
|
16
16
|
s.dependency 'React'
|
|
17
|
-
s.dependency 'InsiderMobile', '12.
|
|
17
|
+
s.dependency 'InsiderMobile', '12.4.0'
|
|
18
18
|
s.dependency 'InsiderHybrid', '1.1.2'
|
|
19
19
|
end
|
package/android/build.gradle
CHANGED
|
@@ -8,7 +8,7 @@ buildscript {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
dependencies {
|
|
11
|
-
classpath 'com.android.tools.build:gradle:7.1
|
|
11
|
+
classpath 'com.android.tools.build:gradle:7.2.1'
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -19,10 +19,10 @@ def getVersionFromPartner(config, fallback) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
android {
|
|
22
|
-
compileSdkVersion getVersionFromPartner('compileSdkVersion',
|
|
22
|
+
compileSdkVersion getVersionFromPartner('compileSdkVersion', 32)
|
|
23
23
|
|
|
24
24
|
defaultConfig {
|
|
25
|
-
minSdkVersion getVersionFromPartner('minSdkVersion',
|
|
25
|
+
minSdkVersion getVersionFromPartner('minSdkVersion', 19)
|
|
26
26
|
multiDexEnabled true
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -35,14 +35,17 @@ android {
|
|
|
35
35
|
|
|
36
36
|
dependencies {
|
|
37
37
|
implementation "com.facebook.react:react-native:${getVersionFromPartner('reactNativeVersion', '+')}"
|
|
38
|
-
implementation ('com.useinsider:insider:13.1
|
|
38
|
+
implementation ('com.useinsider:insider:13.3.1')
|
|
39
39
|
implementation ('com.useinsider:insiderhybrid:1.1.3')
|
|
40
40
|
|
|
41
|
-
implementation 'com.google.android.play:core:1.10.3'
|
|
42
41
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
43
|
-
implementation 'com.google.android.gms:play-services-location:
|
|
44
|
-
implementation 'com.google.android.gms:play-services-ads:
|
|
45
|
-
implementation 'com.google.firebase:firebase-messaging:23.0.
|
|
42
|
+
implementation 'com.google.android.gms:play-services-location:20.0.0'
|
|
43
|
+
implementation 'com.google.android.gms:play-services-ads:21.0.0'
|
|
44
|
+
implementation 'com.google.firebase:firebase-messaging:23.0.5'
|
|
46
45
|
implementation 'androidx.lifecycle:lifecycle-process:2.4.1'
|
|
46
|
+
|
|
47
|
+
implementation 'com.huawei.hms:push:6.5.0.300'
|
|
48
|
+
implementation 'com.huawei.hms:ads-identifier:3.4.39.302'
|
|
49
|
+
implementation 'com.huawei.hms:location:6.3.0.300'
|
|
47
50
|
|
|
48
51
|
}
|
|
@@ -601,6 +601,10 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
601
601
|
}
|
|
602
602
|
String provider = Insider.Instance.getCurrentProvider(reactContext);
|
|
603
603
|
switch (provider) {
|
|
604
|
+
case "huawei":
|
|
605
|
+
com.huawei.hms.push.RemoteMessage hmsRemoteMessage = new com.huawei.hms.push.RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
|
|
606
|
+
Insider.Instance.handleHMSNotification(reactContext, hmsRemoteMessage);
|
|
607
|
+
break;
|
|
604
608
|
case "other":
|
|
605
609
|
case "google":
|
|
606
610
|
RemoteMessage fcmRemoteMessage = new RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
|
package/changelog/5.0.2.md
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
NEW_RN_VERSION_NAME=$1
|
|
4
|
+
|
|
5
|
+
packagejson_file_path="package.json"
|
|
6
|
+
podspec_file_path="RNInsider.podspec"
|
|
7
|
+
gradle_file_path="android/build.gradle"
|
|
8
|
+
|
|
9
|
+
CURRENT_RN_SDK_VERSION=$(sed -n 3p $packagejson_file_path | cut -d '"' -f 4)
|
|
10
|
+
|
|
11
|
+
CURRENT_iOS_VERSION=$(sed -n 17p $podspec_file_path | awk '{print $3}' | sed 's/^.//;s/.$//')
|
|
12
|
+
CURRENT_iOS_HYBRID_VERSION=$(sed -n 18p $podspec_file_path | awk '{print $3}' | sed 's/^.//;s/.$//')
|
|
13
|
+
|
|
14
|
+
CURRENT_ANDROID_VERSION=$(sed -n 39p $gradle_file_path | awk '{print $2}' | awk -F : '{print $3}' | cut -d "'" -f 1)
|
|
15
|
+
CURRENT_ANDROID_HYBRID_VERSION=$(sed -n 40p $gradle_file_path | awk '{print $2}' | awk -F : '{print $3}' | cut -d "'" -f 1)
|
|
16
|
+
|
|
17
|
+
LATEST_iOS_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/iOS/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $2}')
|
|
18
|
+
LATEST_iOS_HYBRID_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/iOSHybrid/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $2}')
|
|
19
|
+
|
|
20
|
+
LATEST_ANDROID_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/android/com/useinsider/insider/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $5}' | cut -d "-" -f 1)
|
|
21
|
+
LATEST_ANDROID_HYBRID_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/android/com/useinsider/insiderhybrid/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $5}')
|
|
22
|
+
|
|
23
|
+
# Set new version in package.json
|
|
24
|
+
sed -i "s/$CURRENT_RN_SDK_VERSION/$NEW_RN_VERSION_NAME/" $packagejson_file_path
|
|
25
|
+
|
|
26
|
+
# Set new version in podspec
|
|
27
|
+
sed -i "s/$CURRENT_iOS_VERSION/$LATEST_iOS_VERSION/;s/$CURRENT_iOS_HYBRID_VERSION/$LATEST_iOS_HYBRID_VERSION/" $podspec_file_path
|
|
28
|
+
|
|
29
|
+
# Set new version in build.gradle
|
|
30
|
+
sed -i "s/$CURRENT_ANDROID_VERSION/$LATEST_ANDROID_VERSION/;s/$CURRENT_ANDROID_HYBRID_VERSION/$LATEST_ANDROID_HYBRID_VERSION/" $gradle_file_path
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
SLACK_ENDPOINT="https://mobile.useinsider.com/api/lilith/slack_notifier"
|
|
3
|
+
|
|
4
|
+
CHANNEL=$1
|
|
5
|
+
USERNAME=$2
|
|
6
|
+
TEXT="$3"
|
|
7
|
+
|
|
8
|
+
generate_post_data()
|
|
9
|
+
{
|
|
10
|
+
cat <<EOF
|
|
11
|
+
{
|
|
12
|
+
"channel": "$CHANNEL",
|
|
13
|
+
"message": "$TEXT",
|
|
14
|
+
"username": "$USERNAME"
|
|
15
|
+
}
|
|
16
|
+
EOF
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
curl -i -H "Content-Type:application/json" -X POST --data "$(generate_post_data)" $SLACK_ENDPOINT >/dev/null 2>&1
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
name: NPM Publish
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- "*"
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
release:
|
|
10
|
-
name: Create Release
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
steps:
|
|
14
|
-
- name: Checkout code
|
|
15
|
-
uses: actions/checkout@v3
|
|
16
|
-
with:
|
|
17
|
-
ref: develop
|
|
18
|
-
|
|
19
|
-
- name: Set release name
|
|
20
|
-
run: echo "RELEASE_NAME=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
|
|
21
|
-
|
|
22
|
-
- name: Create release
|
|
23
|
-
id: create_release
|
|
24
|
-
uses: actions/create-release@v1
|
|
25
|
-
env:
|
|
26
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
27
|
-
with:
|
|
28
|
-
tag_name: ${{ github.ref }}
|
|
29
|
-
release_name: ${{ env.RELEASE_NAME }}
|
|
30
|
-
body_path: changelog/${{ env.RELEASE_NAME }}.md
|
|
31
|
-
draft: false
|
|
32
|
-
prerelease: false
|
|
33
|
-
build:
|
|
34
|
-
runs-on: ubuntu-latest
|
|
35
|
-
steps:
|
|
36
|
-
- uses: actions/checkout@v3
|
|
37
|
-
- uses: actions/setup-node@v3.1.0
|
|
38
|
-
with:
|
|
39
|
-
node-version: 12
|
|
40
|
-
- run: npm ci
|
|
41
|
-
- run: npm test
|
|
42
|
-
|
|
43
|
-
publish-npm:
|
|
44
|
-
needs: build
|
|
45
|
-
runs-on: ubuntu-latest
|
|
46
|
-
steps:
|
|
47
|
-
- uses: actions/checkout@v3
|
|
48
|
-
- uses: actions/setup-node@v3.1.0
|
|
49
|
-
with:
|
|
50
|
-
node-version: 12
|
|
51
|
-
registry-url: https://registry.npmjs.org/
|
|
52
|
-
- run: npm ci
|
|
53
|
-
- run: npm publish
|
|
54
|
-
env:
|
|
55
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
56
|
-
- run: |
|
|
57
|
-
text=":atom_symbol: A new version of React Native SDK is published."
|
|
58
|
-
object='{"text": "'"$text"'"}'
|
|
59
|
-
curl -X POST -H 'Content-type: application/json' --data "$object" https://hooks.slack.com/services/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
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
name: NPM Publish
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
repository_dispatch:
|
|
5
|
-
types: sdk-deploy
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
release:
|
|
9
|
-
name: Create Release
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout code
|
|
14
|
-
uses: actions/checkout@v3
|
|
15
|
-
with:
|
|
16
|
-
ref: develop
|
|
17
|
-
|
|
18
|
-
- name: Set release name
|
|
19
|
-
run: echo "RELEASE_NAME=${{ github.event.client_payload.sdk_version }}" >> $GITHUB_ENV
|
|
20
|
-
|
|
21
|
-
- name: Create release
|
|
22
|
-
id: create_release
|
|
23
|
-
uses: actions/create-release@v1
|
|
24
|
-
env:
|
|
25
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
-
with:
|
|
27
|
-
tag_name: ${{ github.event.client_payload.sdk_version }}
|
|
28
|
-
release_name: ${{ env.RELEASE_NAME }}
|
|
29
|
-
body: ${{ github.event.client_payload.description }}
|
|
30
|
-
draft: false
|
|
31
|
-
prerelease: false
|
|
32
|
-
build:
|
|
33
|
-
runs-on: ubuntu-latest
|
|
34
|
-
steps:
|
|
35
|
-
- uses: actions/checkout@v3
|
|
36
|
-
- uses: actions/setup-node@v3.1.0
|
|
37
|
-
with:
|
|
38
|
-
node-version: 12
|
|
39
|
-
- run: npm ci
|
|
40
|
-
- run: npm test
|
|
41
|
-
|
|
42
|
-
publish-npm:
|
|
43
|
-
needs: build
|
|
44
|
-
runs-on: ubuntu-latest
|
|
45
|
-
steps:
|
|
46
|
-
- uses: actions/checkout@v3
|
|
47
|
-
- uses: actions/setup-node@v3.1.0
|
|
48
|
-
with:
|
|
49
|
-
node-version: 12
|
|
50
|
-
registry-url: https://registry.npmjs.org/
|
|
51
|
-
- run: npm ci
|
|
52
|
-
- run: npm publish
|
|
53
|
-
env:
|
|
54
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
55
|
-
- run: |
|
|
56
|
-
text=":atom_symbol: A new version of React Native SDK is published."
|
|
57
|
-
object='{"text": "'"$text"'"}'
|
|
58
|
-
curl -X POST -H 'Content-type: application/json' --data "$object" https://hooks.slack.com/services/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
|