Skip to content

Commit 1104962

Browse files
committed
update version
1 parent 63f0879 commit 1104962

File tree

9 files changed

+67
-9
lines changed

9 files changed

+67
-9
lines changed

Radar.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
s.source_files = "ios/**/*.{h,m,mm,cpp}"
1717
s.private_header_files = "ios/**/*.h"
1818

19-
s.dependency "RadarSDK", "~> 3.23.1"
19+
s.dependency "RadarSDK", "3.23.1"
2020

2121
install_modules_dependencies(s)
2222
end

android/src/newarch/java/com/radar/RadarModule.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class RadarModule(reactContext: ReactApplicationContext) :
105105
override fun initialize(publishableKey: String, fraud: Boolean): Unit {
106106
val editor = reactApplicationContext.getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit()
107107
editor.putString("x_platform_sdk_type", "ReactNative")
108-
editor.putString("x_platform_sdk_version", "3.22.1")
108+
editor.putString("x_platform_sdk_version", "3.23.0")
109109
editor.apply()
110110

111111
if (fraud) {

android/src/oldarch/java/com/radar/RadarModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public void initialize(String publishableKey, boolean fraud) {
9898
this.fraud = fraud;
9999
SharedPreferences.Editor editor = getReactApplicationContext().getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit();
100100
editor.putString("x_platform_sdk_type", "ReactNative");
101-
editor.putString("x_platform_sdk_version", "3.22.1");
101+
editor.putString("x_platform_sdk_version", "3.23.0");
102102
editor.apply();
103103
if (fraud) {
104104
Radar.initialize(getReactApplicationContext(), publishableKey, receiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud);

example/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ios/RNRadar.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ - (void)didUpdateToken:(RadarVerifiedLocationToken *)token {
139139

140140
RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey fraud:(BOOL)fraud) {
141141
[[NSUserDefaults standardUserDefaults] setObject:@"ReactNative" forKey:@"radar-xPlatformSDKType"];
142-
[[NSUserDefaults standardUserDefaults] setObject:@"3.22.1" forKey:@"radar-xPlatformSDKVersion"];
142+
[[NSUserDefaults standardUserDefaults] setObject:@"3.23.0" forKey:@"radar-xPlatformSDKVersion"];
143143
[Radar initializeWithPublishableKey:publishableKey];
144144
}
145145

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "React Native module for Radar, the leading geofencing and location tracking platform",
44
"homepage": "https://radar.com",
55
"license": "Apache-2.0",
6-
"version": "3.22.1",
6+
"version": "3.23.0",
77
"main": "dist/index.js",
88
"files": [
99
"dist",

set-version.sh

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/bin/sh
2+
3+
if [ $# -eq 3 ]; then
4+
echo "\033[1;33mUpdating react-native-radar to $1, using iOS SDK $2 and Android SDK $3\033[0m"
5+
npm_version=$1
6+
ios_version=$2
7+
android_version=$3
8+
elif [ $# -eq 1 ]; then
9+
echo "\033[0;33mOnly one argument provided, assuming all versions match $1\033[0m"
10+
npm_version=$1
11+
ios_version=$1
12+
android_version=$1
13+
else
14+
echo "Usage: $0 <RN version> <iOS version> <Android version>"
15+
exit 1
16+
fi
17+
18+
########################################################
19+
# sed has slightly different syntax on linux vs mac
20+
if [ $(uname -s) = "Darwin" ]; then
21+
alias sed_inplace="sed -E -i ''"
22+
else
23+
alias sed_inplace="sed -E -i"
24+
fi
25+
26+
27+
########################################################
28+
echo "\033[0;32mUpdating package version to $npm_version\033[0m"
29+
# update version in package.json and package-lock.json
30+
npm version $npm_version --no-git-tag-version --silent > /dev/null
31+
echo " - NPM complete"
32+
33+
# update x_platform_sdk_version for android
34+
sed_inplace 's/editor.putString\("x_platform_sdk_version", "(.+)"\);/editor.putString\("x_platform_sdk_version", "'$npm_version'"\);/' android/src/oldarch/java/com/radar/RadarModule.java
35+
sed_inplace 's/editor.putString\("x_platform_sdk_version", "(.+)"\)/editor.putString\("x_platform_sdk_version", "'$npm_version'"\)/' android/src/newarch/java/com/radar/RadarModule.kt
36+
echo " - Android complete"
37+
38+
# update x_platform_sdk_version for iOS
39+
sed_inplace 's/\[\[NSUserDefaults standardUserDefaults\] setObject:\@"(.+)" forKey:\@"radar-xPlatformSDKVersion"\];/\[\[NSUserDefaults standardUserDefaults\] setObject:\@"'$npm_version'" forKey:\@"radar-xPlatformSDKVersion"\];/' ios/RNRadar.mm
40+
echo " - iOS complete"
41+
42+
########################################################
43+
echo "\033[0;32mUpdating SDK versions, iOS: $ios_version, Android: $android_version\033[0m"
44+
# update Android RadarSDK version
45+
sed_inplace "s/def radar_sdk_version = '(.+)'/def radar_sdk_version = '$android_version'/" android/build.gradle
46+
echo " - Android complete"
47+
48+
# update iOS RadarSDK version
49+
sed_inplace 's/s.dependency "RadarSDK", "(.+)"/s.dependency "RadarSDK", "'$ios_version'"/' Radar.podspec
50+
echo " - iOS complete"
51+
52+
########################################################
53+
# test build
54+
echo "\033[0;32mBuilding react-native-radar\033[0m"
55+
npm run build-all
56+
57+
echo "\033[0;32mBuilding example app\033[0m"
58+
(cd example && npm run install-radar-rebuild)

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// This file contains the version of the react-native-radar package
22
// It should be updated to match the version in package.json
3-
export const VERSION = '3.22.0';
3+
export const VERSION = '3.23.0';

0 commit comments

Comments
 (0)