From 6a214e8baf6900de62fc9ba59ce52d3ce660c22c Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Mon, 10 Jun 2024 10:07:28 +0300 Subject: [PATCH 01/24] start change --- .github/bash_scripts/pre_release.sh | 1 + .github/workflows/prepare-for-QA-release.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/bash_scripts/pre_release.sh b/.github/bash_scripts/pre_release.sh index 8d9281b..b512598 100644 --- a/.github/bash_scripts/pre_release.sh +++ b/.github/bash_scripts/pre_release.sh @@ -3,6 +3,7 @@ appsflyerLibVersion=$1 sed -i '' "s/version_appsflyerLib = \'.*\'/version_appsflyerLib = \'$appsflyerLibVersion\'/g" segment-appsflyer-ios.podspec +sed -i '' "s/s.name = \"segment-appsflyer-ios\"/s.name = \"segment-appsflyer-ios-qa\"/g" segment-appsflyer-ios.podspec sed -r -i '' "s/(.*AppsFlyerLib.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)/\1$appsflyerLibVersion\3/g" Package.swift diff --git a/.github/workflows/prepare-for-QA-release.yml b/.github/workflows/prepare-for-QA-release.yml index 1e8b617..2b0644e 100644 --- a/.github/workflows/prepare-for-QA-release.yml +++ b/.github/workflows/prepare-for-QA-release.yml @@ -12,6 +12,7 @@ jobs: uses: actions/checkout@v3 - name: Determine release tag and release branch run: | + echo ${{github.ref_name}} TAG=$(echo "${{github.ref_name}}" | grep -Eo '[0-9]+.[0-9]+.[0-9]+') echo "PLUGIN_VERSION=$TAG" >> $GITHUB_ENV - name: run script From b4c99fb226c80e7e00c4229dc5210b6cfb54f52a Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Mon, 10 Jun 2024 10:17:46 +0300 Subject: [PATCH 02/24] add to podspec qa modifications --- .github/bash_scripts/pre_release.sh | 2 ++ .github/workflows/prepare-for-QA-release.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/bash_scripts/pre_release.sh b/.github/bash_scripts/pre_release.sh index b512598..47e43ff 100644 --- a/.github/bash_scripts/pre_release.sh +++ b/.github/bash_scripts/pre_release.sh @@ -1,8 +1,10 @@ #!/bin/bash appsflyerLibVersion=$1 +rcVersion=$2 sed -i '' "s/version_appsflyerLib = \'.*\'/version_appsflyerLib = \'$appsflyerLibVersion\'/g" segment-appsflyer-ios.podspec +sed -i '' "s/version_plugin = \'.*\'/version_plugin = \'$rcVersion\'/g" segment-appsflyer-ios.podspec sed -i '' "s/s.name = \"segment-appsflyer-ios\"/s.name = \"segment-appsflyer-ios-qa\"/g" segment-appsflyer-ios.podspec sed -r -i '' "s/(.*AppsFlyerLib.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)/\1$appsflyerLibVersion\3/g" Package.swift diff --git a/.github/workflows/prepare-for-QA-release.yml b/.github/workflows/prepare-for-QA-release.yml index 2b0644e..502841d 100644 --- a/.github/workflows/prepare-for-QA-release.yml +++ b/.github/workflows/prepare-for-QA-release.yml @@ -16,7 +16,7 @@ jobs: TAG=$(echo "${{github.ref_name}}" | grep -Eo '[0-9]+.[0-9]+.[0-9]+') echo "PLUGIN_VERSION=$TAG" >> $GITHUB_ENV - name: run script - run: bash .github/bash_scripts/pre_release.sh ${{env.PLUGIN_VERSION}} + run: bash .github/bash_scripts/pre_release.sh ${{env.PLUGIN_VERSION}} ${{github.ref_name}} - name: Commit changes uses: EndBug/add-and-commit@v9 with: From a51d3b72cf494c67b9aca4b1f972d61623ff6c45 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Mon, 10 Jun 2024 10:35:35 +0300 Subject: [PATCH 03/24] add tag --- .github/workflows/prepare-for-QA-release.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prepare-for-QA-release.yml b/.github/workflows/prepare-for-QA-release.yml index 502841d..8ec238a 100644 --- a/.github/workflows/prepare-for-QA-release.yml +++ b/.github/workflows/prepare-for-QA-release.yml @@ -14,14 +14,20 @@ jobs: run: | echo ${{github.ref_name}} TAG=$(echo "${{github.ref_name}}" | grep -Eo '[0-9]+.[0-9]+.[0-9]+') - echo "PLUGIN_VERSION=$TAG" >> $GITHUB_ENV + echo "PLUGIN_VERSION=$TAG" >> $GITHUB_ENV + TAG_RC=$(echo "${{github.ref_name}}" | grep -Eo '[0-9]+.[0-9]+.[0-9]+-rc[0-9]+') + echo "PLUGIN_VERSION_RC=$TAG_RC" >> $GITHUB_ENV + - name: run script - run: bash .github/bash_scripts/pre_release.sh ${{env.PLUGIN_VERSION}} ${{github.ref_name}} + run: bash .github/bash_scripts/pre_release.sh ${{env.PLUGIN_VERSION}} ${{env.PLUGIN_VERSION_RC}} - name: Commit changes uses: EndBug/add-and-commit@v9 with: author_name: Moris Gateno author_email: moris.gateno@appsflyer.com message: 'Commited from github action - prepaing the repo for QA locally.' - add: '.' + add: '.' + tag: "${{env.PLUGIN_VERSION_RC}} --force" + tag_push: '--force' + From 4e9586d108412a656732fd891a51fed3c79d32ca Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Mon, 10 Jun 2024 11:22:00 +0300 Subject: [PATCH 04/24] add change yo workflows --- .github/bash_scripts/pre_release.sh | 1 + .github/workflows/release-QA-workflow.yml | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/bash_scripts/pre_release.sh b/.github/bash_scripts/pre_release.sh index 47e43ff..a482bb1 100644 --- a/.github/bash_scripts/pre_release.sh +++ b/.github/bash_scripts/pre_release.sh @@ -6,6 +6,7 @@ rcVersion=$2 sed -i '' "s/version_appsflyerLib = \'.*\'/version_appsflyerLib = \'$appsflyerLibVersion\'/g" segment-appsflyer-ios.podspec sed -i '' "s/version_plugin = \'.*\'/version_plugin = \'$rcVersion\'/g" segment-appsflyer-ios.podspec sed -i '' "s/s.name = \"segment-appsflyer-ios\"/s.name = \"segment-appsflyer-ios-qa\"/g" segment-appsflyer-ios.podspec +mv segment-appsflyer-ios.podspec segment-appsflyer-ios-qa.podspec sed -r -i '' "s/(.*AppsFlyerLib.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)/\1$appsflyerLibVersion\3/g" Package.swift diff --git a/.github/workflows/release-QA-workflow.yml b/.github/workflows/release-QA-workflow.yml index c1dfe27..c9dfc03 100644 --- a/.github/workflows/release-QA-workflow.yml +++ b/.github/workflows/release-QA-workflow.yml @@ -25,7 +25,20 @@ jobs: if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' uses: ./.github/workflows/unit-tests-workflow.yml - Deploy-Locally-To-QA: + Prepere-To-QA: needs: [Run-Unit-Tests,Check-If-ReleaseNotes-Pushed] if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' uses: ./.github/workflows/prepare-for-QA-release.yml + + Release-To-QA: + needs: [Run-Unit-Tests,Check-If-ReleaseNotes-Pushed,Prepere-To-QA] + if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' + steps: + - name: Install Cocoapods + run: gem install cocoapods + - name: Push to COCOAPODS + uses: michaelhenry/deploy-to-cocoapods-github-action@1.0.10 + env: + COCOAPODS_TRUNK_TOKEN: ${{ secrets.CI_COCOAPODS_TOKEN }} + + From 6c51caf8a6762996b54b2a0d9789dbb3dcc90bf0 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Mon, 10 Jun 2024 16:17:38 +0300 Subject: [PATCH 05/24] . --- .github/workflows/release-QA-workflow.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release-QA-workflow.yml b/.github/workflows/release-QA-workflow.yml index c9dfc03..fa64311 100644 --- a/.github/workflows/release-QA-workflow.yml +++ b/.github/workflows/release-QA-workflow.yml @@ -31,9 +31,12 @@ jobs: uses: ./.github/workflows/prepare-for-QA-release.yml Release-To-QA: + runs-on: macos-latest needs: [Run-Unit-Tests,Check-If-ReleaseNotes-Pushed,Prepere-To-QA] if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' steps: + - name: Checkout + uses: actions/checkout@v3 - name: Install Cocoapods run: gem install cocoapods - name: Push to COCOAPODS From 9d954a93eeae7bc1281692f272528996d62e037a Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Mon, 10 Jun 2024 16:38:15 +0300 Subject: [PATCH 06/24] . --- ...release.yml => prepare-for-QA-&-release.yml} | 9 +++++++++ .github/workflows/release-QA-workflow.yml | 17 +---------------- 2 files changed, 10 insertions(+), 16 deletions(-) rename .github/workflows/{prepare-for-QA-release.yml => prepare-for-QA-&-release.yml} (79%) diff --git a/.github/workflows/prepare-for-QA-release.yml b/.github/workflows/prepare-for-QA-&-release.yml similarity index 79% rename from .github/workflows/prepare-for-QA-release.yml rename to .github/workflows/prepare-for-QA-&-release.yml index 8ec238a..ae6a1c3 100644 --- a/.github/workflows/prepare-for-QA-release.yml +++ b/.github/workflows/prepare-for-QA-&-release.yml @@ -30,4 +30,13 @@ jobs: tag: "${{env.PLUGIN_VERSION_RC}} --force" tag_push: '--force' + Release-To-QA: + - name: Install Cocoapods + run: gem install cocoapods + - name: Push to COCOAPODS + uses: michaelhenry/deploy-to-cocoapods-github-action@1.0.10 + env: + COCOAPODS_TRUNK_TOKEN: ${{ secrets.CI_COCOAPODS_TOKEN }} + + diff --git a/.github/workflows/release-QA-workflow.yml b/.github/workflows/release-QA-workflow.yml index fa64311..7e6e39c 100644 --- a/.github/workflows/release-QA-workflow.yml +++ b/.github/workflows/release-QA-workflow.yml @@ -28,20 +28,5 @@ jobs: Prepere-To-QA: needs: [Run-Unit-Tests,Check-If-ReleaseNotes-Pushed] if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' - uses: ./.github/workflows/prepare-for-QA-release.yml - - Release-To-QA: - runs-on: macos-latest - needs: [Run-Unit-Tests,Check-If-ReleaseNotes-Pushed,Prepere-To-QA] - if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install Cocoapods - run: gem install cocoapods - - name: Push to COCOAPODS - uses: michaelhenry/deploy-to-cocoapods-github-action@1.0.10 - env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.CI_COCOAPODS_TOKEN }} - + uses: ./.github/workflows/prepare-for-QA-&-release.yml From eec1ea00f7bd1495a06498a53fff79b2d452ad63 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Mon, 10 Jun 2024 17:47:59 +0300 Subject: [PATCH 07/24] . --- .github/workflows/prepare-for-QA-&-release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/prepare-for-QA-&-release.yml b/.github/workflows/prepare-for-QA-&-release.yml index ae6a1c3..485620d 100644 --- a/.github/workflows/prepare-for-QA-&-release.yml +++ b/.github/workflows/prepare-for-QA-&-release.yml @@ -34,9 +34,13 @@ jobs: - name: Install Cocoapods run: gem install cocoapods - name: Push to COCOAPODS - uses: michaelhenry/deploy-to-cocoapods-github-action@1.0.10 + # uses: michaelhenry/deploy-to-cocoapods-github-action@1.0.10 + # env: + # COCOAPODS_TRUNK_TOKEN: ${{ secrets.CI_COCOAPODS_TOKEN }} env: COCOAPODS_TRUNK_TOKEN: ${{ secrets.CI_COCOAPODS_TOKEN }} + run: | + pod trunk push segment-appsflyer-ios-qa.podspec From 03d983e2c63b0ffbc8e89e851d24ea4d704dc9b1 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Mon, 10 Jun 2024 18:01:18 +0300 Subject: [PATCH 08/24] . --- .github/workflows/prepare-for-QA-&-release.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/prepare-for-QA-&-release.yml b/.github/workflows/prepare-for-QA-&-release.yml index 485620d..07488c3 100644 --- a/.github/workflows/prepare-for-QA-&-release.yml +++ b/.github/workflows/prepare-for-QA-&-release.yml @@ -34,13 +34,9 @@ jobs: - name: Install Cocoapods run: gem install cocoapods - name: Push to COCOAPODS - # uses: michaelhenry/deploy-to-cocoapods-github-action@1.0.10 - # env: - # COCOAPODS_TRUNK_TOKEN: ${{ secrets.CI_COCOAPODS_TOKEN }} + uses: michaelhenry/deploy-to-cocoapods-github-action@1.0.10 env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.CI_COCOAPODS_TOKEN }} - run: | - pod trunk push segment-appsflyer-ios-qa.podspec + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} From 8361cddc138eb9b62727d702bad96bd8f4439907 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Tue, 11 Jun 2024 10:06:16 +0300 Subject: [PATCH 09/24] self_host --- .github/workflows/prepare-for-QA-&-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prepare-for-QA-&-release.yml b/.github/workflows/prepare-for-QA-&-release.yml index 07488c3..7250a5e 100644 --- a/.github/workflows/prepare-for-QA-&-release.yml +++ b/.github/workflows/prepare-for-QA-&-release.yml @@ -6,7 +6,7 @@ on: jobs: Change-HardCoded-Version: name: Pre Release - runs-on: macos-latest + runs-on: [ios, self-hosted] steps: - name: Checkout uses: actions/checkout@v3 From 1e79680fa76b80f427bcbf9a5283d08fd6b330e5 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Tue, 11 Jun 2024 10:17:29 +0300 Subject: [PATCH 10/24] . --- .github/workflows/prepare-for-QA-&-release.yml | 6 +----- .github/workflows/release-QA-workflow.yml | 8 ++++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/prepare-for-QA-&-release.yml b/.github/workflows/prepare-for-QA-&-release.yml index 7250a5e..266db7f 100644 --- a/.github/workflows/prepare-for-QA-&-release.yml +++ b/.github/workflows/prepare-for-QA-&-release.yml @@ -28,11 +28,7 @@ jobs: message: 'Commited from github action - prepaing the repo for QA locally.' add: '.' tag: "${{env.PLUGIN_VERSION_RC}} --force" - tag_push: '--force' - - Release-To-QA: - - name: Install Cocoapods - run: gem install cocoapods + tag_push: '--force' - name: Push to COCOAPODS uses: michaelhenry/deploy-to-cocoapods-github-action@1.0.10 env: diff --git a/.github/workflows/release-QA-workflow.yml b/.github/workflows/release-QA-workflow.yml index 7e6e39c..1adf787 100644 --- a/.github/workflows/release-QA-workflow.yml +++ b/.github/workflows/release-QA-workflow.yml @@ -20,10 +20,10 @@ jobs: releasenotesfile: - 'releasenotes.**' - Run-Unit-Tests: - needs: Check-If-ReleaseNotes-Pushed - if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' - uses: ./.github/workflows/unit-tests-workflow.yml + # Run-Unit-Tests: + # needs: Check-If-ReleaseNotes-Pushed + # if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' + # uses: ./.github/workflows/unit-tests-workflow.yml Prepere-To-QA: needs: [Run-Unit-Tests,Check-If-ReleaseNotes-Pushed] From ef998977439f60281cab0141608f30637234fd95 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Tue, 11 Jun 2024 10:19:30 +0300 Subject: [PATCH 11/24] . --- .github/workflows/release-QA-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-QA-workflow.yml b/.github/workflows/release-QA-workflow.yml index 1adf787..3def389 100644 --- a/.github/workflows/release-QA-workflow.yml +++ b/.github/workflows/release-QA-workflow.yml @@ -26,7 +26,7 @@ jobs: # uses: ./.github/workflows/unit-tests-workflow.yml Prepere-To-QA: - needs: [Run-Unit-Tests,Check-If-ReleaseNotes-Pushed] + needs: [Check-If-ReleaseNotes-Pushed] if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' uses: ./.github/workflows/prepare-for-QA-&-release.yml From a8250fb2aa14e1f60d33e78d786629978a724ff6 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Tue, 11 Jun 2024 10:31:07 +0300 Subject: [PATCH 12/24] . --- .github/workflows/prepare-for-QA-&-release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prepare-for-QA-&-release.yml b/.github/workflows/prepare-for-QA-&-release.yml index 266db7f..5dde7d1 100644 --- a/.github/workflows/prepare-for-QA-&-release.yml +++ b/.github/workflows/prepare-for-QA-&-release.yml @@ -30,9 +30,8 @@ jobs: tag: "${{env.PLUGIN_VERSION_RC}} --force" tag_push: '--force' - name: Push to COCOAPODS - uses: michaelhenry/deploy-to-cocoapods-github-action@1.0.10 - env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + run: | + pod trunk push segment-appsflyer-ios-qa.podspec From f22115093ad333fd565183d8bcf78cac7c13b2ea Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Tue, 11 Jun 2024 10:52:44 +0300 Subject: [PATCH 13/24] . --- .github/workflows/prepare-for-QA-&-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/prepare-for-QA-&-release.yml b/.github/workflows/prepare-for-QA-&-release.yml index 5dde7d1..fcf84ea 100644 --- a/.github/workflows/prepare-for-QA-&-release.yml +++ b/.github/workflows/prepare-for-QA-&-release.yml @@ -31,6 +31,7 @@ jobs: tag_push: '--force' - name: Push to COCOAPODS run: | + pod trunk me pod trunk push segment-appsflyer-ios-qa.podspec From fd7beb7ee7811a63061663e87da165c96454e7f9 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Thu, 13 Jun 2024 11:59:29 +0300 Subject: [PATCH 14/24] =?UTF-8?q?=D7=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Classes/SEGAppsFlyerIntegration.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m b/segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m index 304af66..5465413 100644 --- a/segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m +++ b/segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m @@ -165,7 +165,13 @@ - (void)identify:(SEGIdentifyPayload *)payload } - (void) start { - [self.appsflyer start]; + [self.appsflyer startWithCompletionHandler:^(NSDictionary * _Nullable dictionary, NSError * _Nullable error) { + if(error == nil){ + + [self.appsflyer logEvent:@"Start-Success" withValues:@{}]; + + } + }]; } @@ -257,7 +263,7 @@ - (void)onConversionDataSuccess:(nonnull NSDictionary *)conversionInfo { // If you are working with networks that don't allow passing user level data to 3rd parties, // you will need to apply code to filter out these networks before calling // `[self.analytics track:@"Install Attributed" properties:[properties copy]];` - [self.analytics track:@"Install Attributed" properties: [properties copy]]; + [self.analytics track:@"GCD-Success" properties: [properties copy]]; } From 82e18c164451096a0d6d4d6f3c9f7c63244f53d2 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Thu, 13 Jun 2024 12:07:36 +0300 Subject: [PATCH 15/24] fix test --- SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m b/SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m index 1b5a8d5..b83a908 100644 --- a/SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m +++ b/SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m @@ -431,7 +431,7 @@ - (void)testSEGAppsFlyerIntegration_onConversionDataSuccess_happyflow{ return YES; }]]); OCMStub([SEGAnalyticsMock track:[OCMArg checkWithBlock:^BOOL(id obj) { - XCTAssertTrue([obj isEqual:@"Install Attributed"]); + XCTAssertTrue([obj isEqual:@"GCD_Success"]); return YES; }] properties:[OCMArg checkWithBlock:^BOOL(id obj) { XCTAssertTrue([obj isEqualToDictionary:dictionaryInputToAnalytics]); From 16a35feb0ea053931719cff744de562db2cfa9dd Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Thu, 13 Jun 2024 12:11:32 +0300 Subject: [PATCH 16/24] fix some script stuff --- .github/bash_scripts/pre_release.sh | 4 ++-- .github/bash_scripts/release.sh | 2 ++ .github/workflows/prepare-for-release-workflow.yml | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/bash_scripts/pre_release.sh b/.github/bash_scripts/pre_release.sh index a482bb1..70a55b1 100644 --- a/.github/bash_scripts/pre_release.sh +++ b/.github/bash_scripts/pre_release.sh @@ -10,8 +10,8 @@ mv segment-appsflyer-ios.podspec segment-appsflyer-ios-qa.podspec sed -r -i '' "s/(.*AppsFlyerLib.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)/\1$appsflyerLibVersion\3/g" Package.swift -sed -r -i '' "s/(.*pod \'segment-appsflyer-ios\')(.*\'[0-9]+\.[0-9]+\.[0-9]+\')/\1,:podspec => \'\.\.\/\.\.\/segment-appsflyer-ios.podspec\'/g" examples/SwiftPodsSample/Podfile -sed -r -i '' "s/(.*pod \'segment-appsflyer-ios\')(.*\'[0-9]+\.[0-9]+\.[0-9]+\')/\1,:podspec => \'\.\.\/\.\.\/segment-appsflyer-ios.podspec\'/g" examples/ObjcPodsSample/Podfile +sed -r -i '' "s/(.*pod \'segment-appsflyer-ios\')(.*\'[0-9]+\.[0-9]+\.[0-9]+\')/\1,\'$rcVersion\'/g" examples/SwiftPodsSample/Podfile +sed -r -i '' "s/(.*pod \'segment-appsflyer-ios\')(.*\'[0-9]+\.[0-9]+\.[0-9]+\')/\1,\'$rcVersion\'/g" examples/ObjcPodsSample/Podfile sed -r -i '' "s/(## This is a Segment wrapper for AppsFlyer SDK that is built with iOS SDK v)(.*)/\1$appsflyerLibVersion./g" README.md sed -r -i '' "s/(.*pod \'segment-appsflyer-ios.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)/\1$appsflyerLibVersion\3/g" README.md diff --git a/.github/bash_scripts/release.sh b/.github/bash_scripts/release.sh index a99f077..257fa23 100644 --- a/.github/bash_scripts/release.sh +++ b/.github/bash_scripts/release.sh @@ -3,6 +3,8 @@ releaseVersion=$1 sed -r -i '' "s/version_plugin = \'[0-9]+\.[0-9]+\.[0-9]+\'/version_plugin = \'$releaseVersion\'/g" segment-appsflyer-ios.podspec +sed -i '' "s/s.name = \"segment-appsflyer-ios-qa\"/s.name = \"segment-appsflyer-ios\"/g" segment-appsflyer-ios.podspec +mv segment-appsflyer-ios-qa.podspec segment-appsflyer-ios.podspec sed -r -i '' "s/(.*pod \'segment-appsflyer-ios\')(.*)/\1,\'$releaseVersion\'/g" examples/SwiftPodsSample/Podfile sed -r -i '' "s/(.*pod \'segment-appsflyer-ios\')(.*)/\1,\'$releaseVersion\'/g" examples/ObjcPodsSample/Podfile diff --git a/.github/workflows/prepare-for-release-workflow.yml b/.github/workflows/prepare-for-release-workflow.yml index 99bd4bc..935bfae 100644 --- a/.github/workflows/prepare-for-release-workflow.yml +++ b/.github/workflows/prepare-for-release-workflow.yml @@ -6,7 +6,6 @@ on: - opened branches: - 'master' - # - 'dev/add-release-workflow' jobs: Prepare-Plugin-For-Production: From c379782f4bb705acee309d106159b9f2aba11b19 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Thu, 13 Jun 2024 12:13:01 +0300 Subject: [PATCH 17/24] fix test #2 --- SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m b/SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m index b83a908..104b041 100644 --- a/SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m +++ b/SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m @@ -431,7 +431,7 @@ - (void)testSEGAppsFlyerIntegration_onConversionDataSuccess_happyflow{ return YES; }]]); OCMStub([SEGAnalyticsMock track:[OCMArg checkWithBlock:^BOOL(id obj) { - XCTAssertTrue([obj isEqual:@"GCD_Success"]); + XCTAssertTrue([obj isEqual:@"GCD-Success"]); return YES; }] properties:[OCMArg checkWithBlock:^BOOL(id obj) { XCTAssertTrue([obj isEqualToDictionary:dictionaryInputToAnalytics]); From ed2f89ecee968928d5281b21c2581e316ce68cfe Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Thu, 13 Jun 2024 12:23:45 +0300 Subject: [PATCH 18/24] . --- .github/bash_scripts/release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/bash_scripts/release.sh b/.github/bash_scripts/release.sh index 257fa23..f49c487 100644 --- a/.github/bash_scripts/release.sh +++ b/.github/bash_scripts/release.sh @@ -2,8 +2,8 @@ releaseVersion=$1 -sed -r -i '' "s/version_plugin = \'[0-9]+\.[0-9]+\.[0-9]+\'/version_plugin = \'$releaseVersion\'/g" segment-appsflyer-ios.podspec -sed -i '' "s/s.name = \"segment-appsflyer-ios-qa\"/s.name = \"segment-appsflyer-ios\"/g" segment-appsflyer-ios.podspec +sed -r -i '' "s/version_plugin = \'[0-9]+\.[0-9]+\.[0-9]+.*\'/version_plugin = \'$releaseVersion\'/g" segment-appsflyer-ios-qa.podspec +sed -i '' "s/s.name = \"segment-appsflyer-ios-qa\"/s.name = \"segment-appsflyer-ios\"/g" segment-appsflyer-ios-qa.podspec mv segment-appsflyer-ios-qa.podspec segment-appsflyer-ios.podspec sed -r -i '' "s/(.*pod \'segment-appsflyer-ios\')(.*)/\1,\'$releaseVersion\'/g" examples/SwiftPodsSample/Podfile From 62c662af438fe223b4e64c45315dc9a5c5dc466c Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Thu, 13 Jun 2024 12:38:42 +0300 Subject: [PATCH 19/24] . --- .github/workflows/release-production-workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-production-workflow.yml b/.github/workflows/release-production-workflow.yml index 0eeed02..8faa53e 100644 --- a/.github/workflows/release-production-workflow.yml +++ b/.github/workflows/release-production-workflow.yml @@ -11,7 +11,7 @@ on: jobs: Deploy-To-Production: if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/') - runs-on: macos-latest + runs-on: [ios, self-hosted] steps: - name: Checkout uses: actions/checkout@v3 @@ -49,9 +49,9 @@ jobs: - name: Install Cocoapods run: gem install cocoapods - name: Push to COCOAPODS - uses: michaelhenry/deploy-to-cocoapods-github-action@1.0.10 - env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.CI_COCOAPODS_TOKEN }} + run: | + pod trunk me + pod trunk push segment-appsflyer-ios.podspec - name: Notify with SLack uses: slackapi/slack-github-action@v1.23.0 with: From 93620a3254a423b8bd4fcc0e63dbe085c658d6cd Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Thu, 13 Jun 2024 12:45:55 +0300 Subject: [PATCH 20/24] remove completion handler from start --- segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m b/segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m index 5465413..94c368e 100644 --- a/segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m +++ b/segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m @@ -165,13 +165,7 @@ - (void)identify:(SEGIdentifyPayload *)payload } - (void) start { - [self.appsflyer startWithCompletionHandler:^(NSDictionary * _Nullable dictionary, NSError * _Nullable error) { - if(error == nil){ - - [self.appsflyer logEvent:@"Start-Success" withValues:@{}]; - - } - }]; + [self.appsflyer start]; } From 48bdae9fc0c60867e7f96a67e7a88de61660c1b5 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Thu, 13 Jun 2024 15:22:17 +0300 Subject: [PATCH 21/24] . --- .github/bash_scripts/pre_release.sh | 4 ++-- .github/bash_scripts/release.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/bash_scripts/pre_release.sh b/.github/bash_scripts/pre_release.sh index 70a55b1..8089ade 100644 --- a/.github/bash_scripts/pre_release.sh +++ b/.github/bash_scripts/pre_release.sh @@ -10,8 +10,8 @@ mv segment-appsflyer-ios.podspec segment-appsflyer-ios-qa.podspec sed -r -i '' "s/(.*AppsFlyerLib.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)/\1$appsflyerLibVersion\3/g" Package.swift -sed -r -i '' "s/(.*pod \'segment-appsflyer-ios\')(.*\'[0-9]+\.[0-9]+\.[0-9]+\')/\1,\'$rcVersion\'/g" examples/SwiftPodsSample/Podfile -sed -r -i '' "s/(.*pod \'segment-appsflyer-ios\')(.*\'[0-9]+\.[0-9]+\.[0-9]+\')/\1,\'$rcVersion\'/g" examples/ObjcPodsSample/Podfile +sed -r -i '' "s/(.*pod \'segment-appsflyer-ios)\'(.*\'[0-9]+\.[0-9]+\.[0-9]+\')/\1\',\'$rcVersion\'/g" examples/SwiftPodsSample/Podfile +sed -r -i '' "s/(.*pod \'segment-appsflyer-ios)\'(.*\'[0-9]+\.[0-9]+\.[0-9]+\')/\1\',\'$rcVersion\'/g" examples/ObjcPodsSample/Podfile sed -r -i '' "s/(## This is a Segment wrapper for AppsFlyer SDK that is built with iOS SDK v)(.*)/\1$appsflyerLibVersion./g" README.md sed -r -i '' "s/(.*pod \'segment-appsflyer-ios.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)/\1$appsflyerLibVersion\3/g" README.md diff --git a/.github/bash_scripts/release.sh b/.github/bash_scripts/release.sh index f49c487..9944fa2 100644 --- a/.github/bash_scripts/release.sh +++ b/.github/bash_scripts/release.sh @@ -6,8 +6,8 @@ sed -r -i '' "s/version_plugin = \'[0-9]+\.[0-9]+\.[0-9]+.*\'/version_plugin = \ sed -i '' "s/s.name = \"segment-appsflyer-ios-qa\"/s.name = \"segment-appsflyer-ios\"/g" segment-appsflyer-ios-qa.podspec mv segment-appsflyer-ios-qa.podspec segment-appsflyer-ios.podspec -sed -r -i '' "s/(.*pod \'segment-appsflyer-ios\')(.*)/\1,\'$releaseVersion\'/g" examples/SwiftPodsSample/Podfile -sed -r -i '' "s/(.*pod \'segment-appsflyer-ios\')(.*)/\1,\'$releaseVersion\'/g" examples/ObjcPodsSample/Podfile +sed -r -i '' "s/(.*pod \'segment-appsflyer-ios)-qa\'(.*)/\1\',\'$releaseVersion\'/g" examples/SwiftPodsSample/Podfile +sed -r -i '' "s/(.*pod \'segment-appsflyer-ios)-qa\'(.*)/\1\',\'$releaseVersion\'/g" examples/ObjcPodsSample/Podfile sed -i '' 's/^/* /' "releasenotes.$releaseVersion" NEW_VERSION_RELEASE_NOTES=$(cat "releasenotes.$releaseVersion") From 10886ddb27a27baf0df7ea1a7e407678f4bec5d4 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Thu, 13 Jun 2024 16:39:28 +0300 Subject: [PATCH 22/24] . --- .github/workflows/release-QA-workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-QA-workflow.yml b/.github/workflows/release-QA-workflow.yml index 3def389..4045655 100644 --- a/.github/workflows/release-QA-workflow.yml +++ b/.github/workflows/release-QA-workflow.yml @@ -20,10 +20,10 @@ jobs: releasenotesfile: - 'releasenotes.**' - # Run-Unit-Tests: - # needs: Check-If-ReleaseNotes-Pushed - # if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' - # uses: ./.github/workflows/unit-tests-workflow.yml + Run-Unit-Tests: + needs: Check-If-ReleaseNotes-Pushed + if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' + uses: ./.github/workflows/unit-tests-workflow.yml Prepere-To-QA: needs: [Check-If-ReleaseNotes-Pushed] From 97251046b33a0fbd998e7755f269432c8df2da9f Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Sun, 16 Jun 2024 09:54:21 +0300 Subject: [PATCH 23/24] naming jobs --- .github/workflows/prepare-for-QA-&-release.yml | 2 +- .github/workflows/release-QA-workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prepare-for-QA-&-release.yml b/.github/workflows/prepare-for-QA-&-release.yml index fcf84ea..0a91725 100644 --- a/.github/workflows/prepare-for-QA-&-release.yml +++ b/.github/workflows/prepare-for-QA-&-release.yml @@ -4,7 +4,7 @@ on: workflow_call: jobs: - Change-HardCoded-Version: + Change-HardCoded-Version-And-Then-Release: name: Pre Release runs-on: [ios, self-hosted] steps: diff --git a/.github/workflows/release-QA-workflow.yml b/.github/workflows/release-QA-workflow.yml index 4045655..f5d0fd0 100644 --- a/.github/workflows/release-QA-workflow.yml +++ b/.github/workflows/release-QA-workflow.yml @@ -25,7 +25,7 @@ jobs: if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' uses: ./.github/workflows/unit-tests-workflow.yml - Prepere-To-QA: + Prepere-To-QA-&-Release: needs: [Check-If-ReleaseNotes-Pushed] if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' uses: ./.github/workflows/prepare-for-QA-&-release.yml From 266e296b929850a991270c6de916212373c0cf88 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Sun, 16 Jun 2024 11:43:42 +0300 Subject: [PATCH 24/24] . --- SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m | 2 +- segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m b/SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m index 104b041..1b5a8d5 100644 --- a/SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m +++ b/SegmentAppsFlyeriOSTests/SEGAppsFlyerIntegrationTests.m @@ -431,7 +431,7 @@ - (void)testSEGAppsFlyerIntegration_onConversionDataSuccess_happyflow{ return YES; }]]); OCMStub([SEGAnalyticsMock track:[OCMArg checkWithBlock:^BOOL(id obj) { - XCTAssertTrue([obj isEqual:@"GCD-Success"]); + XCTAssertTrue([obj isEqual:@"Install Attributed"]); return YES; }] properties:[OCMArg checkWithBlock:^BOOL(id obj) { XCTAssertTrue([obj isEqualToDictionary:dictionaryInputToAnalytics]); diff --git a/segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m b/segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m index 94c368e..304af66 100644 --- a/segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m +++ b/segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m @@ -257,7 +257,7 @@ - (void)onConversionDataSuccess:(nonnull NSDictionary *)conversionInfo { // If you are working with networks that don't allow passing user level data to 3rd parties, // you will need to apply code to filter out these networks before calling // `[self.analytics track:@"Install Attributed" properties:[properties copy]];` - [self.analytics track:@"GCD-Success" properties: [properties copy]]; + [self.analytics track:@"Install Attributed" properties: [properties copy]]; }