diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 54e3c4a2..c1d95c98 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -14,6 +14,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Build, Analyze, & Test env: scheme: RadarSDK diff --git a/.github/workflows/release-sdk.yml b/.github/workflows/release-sdk.yml index 707d723a..d59c3739 100644 --- a/.github/workflows/release-sdk.yml +++ b/.github/workflows/release-sdk.yml @@ -74,13 +74,22 @@ jobs: event-type: update-xcframework client-payload: '{"release": "${{ github.event.release.tag_name }}", "checksum": "${{ steps.checksum_radarsdk.outputs.checksum }}", "url": "${{ github.event.release.html_url }}", "checksum_motion": "${{ steps.checksum_radarsdkmotion.outputs.checksum }}"}' + - name: Check versions is not duplicate + run: | + VERSION=$(pod ipc spec RadarSDK.podspec | jq -r .version) + ! pod trunk info RadarSDK | grep -q $VERSION + echo "RadarSDK version is OK" + VERSION=$(pod ipc spec RadarSDKMotion.podspec | jq -r .version) + ! pod trunk info RadarSDKMotion | grep -q $VERSION + echo "RadarSDKMotion version is OK" + - name: Deploy to Cocoapods run: | set -eo pipefail gem install cocoapods pod lib lint --allow-warnings RadarSDK.podspec - pod trunk push --allow-warnings RadarSDK.podspec pod lib lint --allow-warnings RadarSDKMotion.podspec + pod trunk push --allow-warnings RadarSDK.podspec pod trunk push --allow-warnings RadarSDKMotion.podspec env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} \ No newline at end of file + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} diff --git a/RadarSDK.xcodeproj/project.pbxproj b/RadarSDK.xcodeproj/project.pbxproj index 528657c7..882399a6 100644 --- a/RadarSDK.xcodeproj/project.pbxproj +++ b/RadarSDK.xcodeproj/project.pbxproj @@ -953,7 +953,6 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.9.6; PRODUCT_BUNDLE_IDENTIFIER = io.radar.sdk; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -983,7 +982,6 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.9.6; PRODUCT_BUNDLE_IDENTIFIER = io.radar.sdk; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/RadarSDKMotion.podspec b/RadarSDKMotion.podspec index 952394ab..08719b87 100644 --- a/RadarSDKMotion.podspec +++ b/RadarSDKMotion.podspec @@ -1,16 +1,15 @@ Pod::Spec.new do |s| - s.name = 'RadarSDKMotion' - s.version = '3.19.1' - s.summary = 'Motion detection plugin for RadarSDK, the leading geofencing and location tracking platform' - s.homepage = 'https://radar.com' - s.author = { 'Radar Labs, Inc.' => 'support@radar.com' } - s.platform = :ios - s.source = { :git => 'https://github.com/radarlabs/radar-sdk-ios.git', :tag => s.version.to_s } - s.source_files = ["RadarSDKMotion/RadarSDKMotion/*.{h,m}", "RadarSDKMotion/RadarSDKMotion/Include/*.h"] - s.module_name = 'RadarSDKMotion' - s.ios.deployment_target = '12.0' - s.frameworks = 'CoreMotion' - s.requires_arc = true - s.license = { :type => 'Apache-2.0' } - end - \ No newline at end of file + s.name = 'RadarSDKMotion' + s.version = '3.19.1' + s.summary = 'Motion detection plugin for RadarSDK, the leading geofencing and location tracking platform' + s.homepage = 'https://radar.com' + s.author = { 'Radar Labs, Inc.' => 'support@radar.com' } + s.platform = :ios + s.source = { :git => 'https://github.com/radarlabs/radar-sdk-ios.git', :tag => s.version.to_s } + s.source_files = ["RadarSDKMotion/RadarSDKMotion/*.{h,m}", "RadarSDKMotion/RadarSDKMotion/Include/*.h"] + s.module_name = 'RadarSDKMotion' + s.ios.deployment_target = '12.0' + s.frameworks = 'CoreMotion' + s.requires_arc = true + s.license = { :type => 'Apache-2.0' } +end diff --git a/RadarSDKMotion/RadarSDKMotion.xcodeproj/project.pbxproj b/RadarSDKMotion/RadarSDKMotion.xcodeproj/project.pbxproj index b6ff455c..a2bf691e 100644 --- a/RadarSDKMotion/RadarSDKMotion.xcodeproj/project.pbxproj +++ b/RadarSDKMotion/RadarSDKMotion.xcodeproj/project.pbxproj @@ -289,6 +289,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 3.18.4; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -347,6 +348,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 3.18.4; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -376,7 +378,6 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; PRODUCT_BUNDLE_IDENTIFIER = RadarLabs.RadarSDKMotion; @@ -407,7 +408,6 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; PRODUCT_BUNDLE_IDENTIFIER = RadarLabs.RadarSDKMotion; @@ -425,7 +425,6 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 96GHH65B9D; GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = RadarLabs.RadarMotionTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = NO; @@ -440,7 +439,6 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 96GHH65B9D; GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = RadarLabs.RadarMotionTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = NO; diff --git a/set_version.sh b/set_version.sh new file mode 100755 index 00000000..3179c664 --- /dev/null +++ b/set_version.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +# sed has slightly different syntax on linux vs mac +if [ $(uname -s) = "Darwin" ]; then + alias sed_inplace="sed -E -i ''" +else + alias sed_inplace="sed -E -i" +fi + +version_full=$1 +version="${version_full%%-*}" + +sed_inplace "s/s.version( +)= '(.+)'/s.version\1= '$version_full'/" RadarSDK.podspec +sed_inplace "s/s.version( +)= '(.+)'/s.version\1= '$version_full'/" RadarSDKMotion.podspec + +sed_inplace "s/MARKETING_VERSION = .+;/MARKETING_VERSION = $version;/" RadarSDK.xcodeproj/project.pbxproj +sed_inplace "s/MARKETING_VERSION = .+;/MARKETING_VERSION = $version;/" RadarSDKMotion/RadarSDKMotion.xcodeproj/project.pbxproj + +sed_inplace "s/return @\"[0-9]+\.[0-9]+\.[0-9]+\";/return @\"$version_full\";/" RadarSDK/RadarUtils.m