-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from adobe/dev
Dev -> Main [AEPMedia v3.0.0 Release]
- Loading branch information
Showing
103 changed files
with
17,010 additions
and
195 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
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,4 @@ | ||
template: | | ||
## What’s Changed | ||
$CHANGES |
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,78 @@ | ||
name: Release | ||
|
||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'tag/version' | ||
required: true | ||
default: '3.0.0' | ||
|
||
action_tag: | ||
description: 'create tag ("no" to skip)' | ||
required: true | ||
default: 'yes' | ||
|
||
release_AEPMedia: | ||
description: 'release AEPMedia ("no" to skip)' | ||
required: true | ||
default: 'yes' | ||
|
||
jobs: | ||
release_media: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
|
||
- name: Install jq | ||
run: brew install jq | ||
|
||
- name: Install cocoapods | ||
run: gem install cocoapods | ||
|
||
- name: Check version in Podspec | ||
run: | | ||
set -eo pipefail | ||
echo Target version: ${{ github.event.inputs.tag }} | ||
make check-version VERSION=${{ github.event.inputs.tag }} | ||
- name: Pod repo update | ||
run: | | ||
pod repo update | ||
- name: SPM integration test | ||
if: ${{ github.event.inputs.action_tag == 'yes' }} | ||
run: | | ||
set -eo pipefail | ||
echo SPM integration test starts: | ||
make test-SPM-integration | ||
- name: podspec file verification | ||
if: ${{ github.event.inputs.action_tag == 'yes' }} | ||
run: | | ||
set -eo pipefail | ||
echo podspec file verification starts: | ||
make test-podspec | ||
- uses: release-drafter/release-drafter@v5 | ||
if: ${{ github.event.inputs.action_tag == 'yes' }} | ||
with: | ||
name: v${{ github.event.inputs.tag }} | ||
tag: ${{ github.event.inputs.tag }} | ||
version: ${{ github.event.inputs.tag }} | ||
publish: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish Pods - AEPMedia | ||
if: ${{ github.event.inputs.release_AEPMedia == 'yes' }} | ||
run: | | ||
set -eo pipefail | ||
pod trunk push AEPMedia.podspec --allow-warnings --synchronous --swift-version=5.1 | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
|
||
|
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
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
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
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,19 @@ | ||
/* | ||
Copyright 2021 Adobe. All rights reserved. | ||
This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. You may obtain a copy | ||
of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software distributed under | ||
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
OF ANY KIND, either express or implied. See the License for the specific language | ||
governing permissions and limitations under the License. | ||
*/ | ||
|
||
import Foundation | ||
|
||
// Adds functionality to compare the equality of two doubles to within the specified delta. | ||
extension Double { | ||
func isAlmostEqual(_ doubleToCompare: Double, accuracy: Double = 0.000001) -> Bool { | ||
return fabs(self - doubleToCompare) < accuracy | ||
} | ||
} |
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,28 @@ | ||
/* | ||
Copyright 2021 Adobe. All rights reserved. | ||
This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. You may obtain a copy | ||
of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software distributed under | ||
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
OF ANY KIND, either express or implied. See the License for the specific language | ||
governing permissions and limitations under the License. | ||
*/ | ||
|
||
import Foundation | ||
import AEPCore | ||
|
||
extension Event { | ||
/// Returns tracker id associated with Event | ||
var trackerId: String? { | ||
return data?[MediaConstants.Tracker.ID] as? String | ||
} | ||
|
||
/// Returns tracker config associated with EVENT_SOURCE_TRACKER_REQUEST Event | ||
var trackerConfig: [String: Any]? { | ||
guard source == MediaConstants.Media.EVENT_SOURCE_TRACKER_REQUEST else { | ||
return nil | ||
} | ||
return data?[MediaConstants.Tracker.EVENT_PARAM] as? [String: Any] | ||
} | ||
} |
Oops, something went wrong.