Skip to content

Commit

Permalink
Add "release action" to AEPCore repo; bump up version to 3.0.0-beta3 (#…
Browse files Browse the repository at this point in the history
…500)

* Add release action to AEPCore repo; bump up version to 3.0.0-beta3

* update all podspec files: always depends on latests (to-be-released) AEPCore/AEPRulesEngine/AEPService
  • Loading branch information
yangyansong-adbe authored Jan 14, 2021
1 parent b8d8906 commit 1fe977a
Show file tree
Hide file tree
Showing 17 changed files with 386 additions and 20 deletions.
102 changes: 102 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Release


on:
workflow_dispatch:
inputs:
tag:
description: 'tag/version'
required: true
default: '1.0.0'

jobs:
release_rules_engine:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
ref: main

- name: Install jq
run: brew install jq

- name: Check version in Podspec
run: |
set -eo pipefail
echo Target version: ${{ github.event.inputs.tag }}
make check-version VERSION=${{ github.event.inputs.tag }}
# "release-drafter" action docs -> https://github.com/marketplace/actions/release-drafter
- name: SPM integration test
run: |
set -eo pipefail
echo SPM integration test starts:
make test-SPM-integration
- name: podspec file verification
run: |
set -eo pipefail
echo podspec file verification starts:
make test-podspec
- uses: release-drafter/release-drafter@v5
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 - AEPService
run: |
set -eo pipefail
gem install cocoapods
pod lib lint AEPServices.podspec --allow-warnings --swift-version=5.1
pod trunk push AEPServices.podspec --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

- name: Sleep for 3 seconds
uses: jakejarvis/wait-action@master
with:
time: '3s'

- name: Publish Pods - AEPCore
run: |
set -eo pipefail
gem install cocoapods
pod lib lint AEPCore.podspec --allow-warnings --swift-version=5.1
pod trunk push AEPCore.podspec --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

- name: Sleep for 3 seconds
uses: jakejarvis/wait-action@master
with:
time: '3s'

- name: Publish Pods - AEPIdentity
run: |
set -eo pipefail
gem install cocoapods
pod lib lint AEPIdentity.podspec --allow-warnings --swift-version=5.1
pod trunk push AEPIdentity.podspec --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

- name: Publish Pods - AEPLifecycle
run: |
set -eo pipefail
gem install cocoapods
pod lib lint AEPLifecycle.podspec --allow-warnings --swift-version=5.1
pod trunk push AEPLifecycle.podspec --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

- name: Publish Pods - AEPSignal
run: |
set -eo pipefail
gem install cocoapods
pod lib lint AEPSignal.podspec --allow-warnings --swift-version=5.1
pod trunk push AEPSignal.podspec --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

6 changes: 3 additions & 3 deletions AEPCore.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "AEPCore"
s.version = "3.0.0-beta.2"
s.version = "3.0.0-beta.3"
s.summary = "Core library for Adobe Experience Platform Mobile SDK. Written and maintained by Adobe."
s.description = <<-DESC
The core library provides the foundation for the Adobe Experience Platform SDK. Having the core library installed is a pre-requisite for any other Adobe Experience Platform SDK extension to work.
Expand All @@ -16,8 +16,8 @@ Pod::Spec.new do |s|

s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }

s.dependency 'AEPRulesEngine'
s.dependency 'AEPServices'
s.dependency 'AEPRulesEngine', '1.0.0-beta.2'
s.dependency 'AEPServices', '3.0.0-beta.3'

s.source_files = 'AEPCore/Sources/**/*.swift'

Expand Down
2 changes: 1 addition & 1 deletion AEPCore/Sources/configuration/ConfigurationConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Foundation
struct ConfigurationConstants {
static let EXTENSION_NAME = "com.adobe.module.configuration"
static let FRIENDLY_NAME = "Configuration"
static let EXTENSION_VERSION = "3.0.0-beta.2"
static let EXTENSION_VERSION = "3.0.0-beta.3"
static let DATA_STORE_NAME = EXTENSION_NAME

static let CONFIG_URL_BASE = "https://assets.adobedtm.com/"
Expand Down
2 changes: 1 addition & 1 deletion AEPCore/Sources/core/CoreConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Foundation

enum CoreConstants {
static let EXTENSION_NAME = "com.adobe.module.configuration"
static let EXTENSION_VERSION = "3.0.0-beta.2"
static let EXTENSION_VERSION = "3.0.0-beta.3"
static let DATA_STORE_NAME = EXTENSION_NAME

static let CONFIG_URL_BASE = "https://assets.adobedtm.com/"
Expand Down
2 changes: 1 addition & 1 deletion AEPCore/Sources/eventhub/EventHubConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ enum EventHubConstants {
static let STATE_CHANGE = "STATE_CHANGE_EVENT"
static let NAME = "com.adobe.module.eventhub"
static let FRIENDLY_NAME = "EventHub"
static let VERSION_NUMBER = "3.0.0-beta.2"
static let VERSION_NUMBER = "3.0.0-beta.3"

enum EventDataKeys {
static let VERSION = "version"
Expand Down
4 changes: 2 additions & 2 deletions AEPCore/Tests/MobileCoreTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class MobileCoreTests: XCTestCase {
"version" : "0.0.1"
},
"Configuration" : {
"version" : "3.0.0-beta.2"
"version" : "3.0.0-beta.3"
},
"mockExtensionTwo" : {
"metadata" : {
Expand All @@ -201,7 +201,7 @@ class MobileCoreTests: XCTestCase {
"version" : "0.0.1"
}
},
"version" : "3.0.0-beta.2"
"version" : "3.0.0-beta.3"
}
"""
let expectedDict = jsonStrToDict(jsonStr: expected)
Expand Down
4 changes: 2 additions & 2 deletions AEPIdentity.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "AEPIdentity"
s.version = "3.0.0-beta.2"
s.version = "3.0.0-beta.3"
s.summary = "Identity extension for Adobe Experience Platform Mobile SDK. Written and maintained by Adobe."
s.description = <<-DESC
The AEPIdentity extension provides APIs that allow use of the Visitor ID services in the Adobe Experience Cloud SDK.
Expand All @@ -17,6 +17,6 @@ Pod::Spec.new do |s|
s.swift_version = '5.1'
s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }

s.dependency 'AEPCore'
s.dependency 'AEPCore', '3.0.0-beta.3'

end
2 changes: 1 addition & 1 deletion AEPIdentity/Sources/IdentityConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Foundation
enum IdentityConstants {
static let EXTENSION_NAME = "com.adobe.module.identity"
static let FRIENDLY_NAME = "Identity"
static let EXTENSION_VERSION = "3.0.0-beta.2"
static let EXTENSION_VERSION = "3.0.0-beta.3"
static let DATASTORE_NAME = EXTENSION_NAME

static let API_TIMEOUT = TimeInterval(0.5) // Get API requests timeout after half a second
Expand Down
4 changes: 2 additions & 2 deletions AEPLifecycle.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "AEPLifecycle"
s.version = "3.0.0-beta.2"
s.version = "3.0.0-beta.3"
s.summary = "Lifecycle extension for Adobe Experience Platform Mobile SDK. Written and maintained by Adobe."
s.description = <<-DESC
The AEPLifecycle extension is used to track application lifecycle including session metricss and device related data.
Expand All @@ -17,5 +17,5 @@ Pod::Spec.new do |s|
s.swift_version = '5.1'
s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }

s.dependency 'AEPCore'
s.dependency 'AEPCore', '3.0.0-beta.3'
end
2 changes: 1 addition & 1 deletion AEPLifecycle/Sources/LifecycleConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Foundation
enum LifecycleConstants {
static let EXTENSION_NAME = "com.adobe.module.lifecycle"
static let FRIENDLY_NAME = "Lifecycle"
static let EXTENSION_VERSION = "3.0.0-beta.2"
static let EXTENSION_VERSION = "3.0.0-beta.3"
static let DATA_STORE_NAME = LifecycleConstants.EXTENSION_NAME

static let START = "start"
Expand Down
2 changes: 1 addition & 1 deletion AEPServices.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "AEPServices"
s.version = "3.0.0-beta.2"
s.version = "3.0.0-beta.3"
s.summary = "Servcies library for Adobe Experience Platform Mobile SDK. Written and maintained by Adobe."
s.description = <<-DESC
The AEPServices library provides the platform services and utilities for the Adobe Experience Platform SDK. Having the services library installed is a pre-requisite for any other Adobe Experience Platform SDK extension to work.
Expand Down
4 changes: 2 additions & 2 deletions AEPSignal.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "AEPSignal"
s.version = "3.0.0-beta.2"
s.version = "3.0.0-beta.3"
s.summary = "Signal extension for Adobe Experience Platform Mobile SDK. Written and maintained by Adobe."
s.description = <<-DESC
The AEPSignal extension provides the support for Postback/PII/Open URL actions triggered by Core rules engine.
Expand All @@ -17,6 +17,6 @@ Pod::Spec.new do |s|
s.swift_version = '5.1'
s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }

s.dependency 'AEPCore'
s.dependency 'AEPCore', '3.0.0-beta.3'

end
2 changes: 1 addition & 1 deletion AEPSignal/Sources/SignalConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Foundation
enum SignalConstants {
static let EXTENSION_NAME = "com.adobe.module.signal"
static let FRIENDLY_NAME = "Signal"
static let EXTENSION_VERSION = "3.0.0-beta.2"
static let EXTENSION_VERSION = "3.0.0-beta.3"
static let DATASTORE_NAME = EXTENSION_NAME
static let LOG_PREFIX = FRIENDLY_NAME

Expand Down
60 changes: 58 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ AEPINTEGRATION_TEST_TARGET_NAME = AEPIntegrationTests
SIMULATOR_ARCHIVE_PATH = ./build/ios_simulator.xcarchive/Products/Library/Frameworks/
IOS_ARCHIVE_PATH = ./build/ios.xcarchive/Products/Library/Frameworks/

# targets
NC='\033[0m'
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'

# Targets - test

aep-core-unit-test:
@echo "######################################################################"
@echo "### Unit Testing AEPCore"
Expand Down Expand Up @@ -45,6 +51,8 @@ integration-test:
@echo "######################################################################"
xcodebuild test -workspace $(PROJECT_NAME).xcworkspace -scheme $(AEPINTEGRATION_TEST_TARGET_NAME) -destination 'platform=iOS Simulator,name=iPhone 8' -derivedDataPath build/out -enableCodeCoverage YES

# Targets - archive

archive:
xcodebuild archive -workspace AEPCore.xcworkspace -scheme AEP-All -archivePath "./build/ios.xcarchive" -sdk iphoneos -destination="iOS" SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
xcodebuild archive -workspace AEPCore.xcworkspace -scheme AEP-All -archivePath "./build/ios_simulator.xcarchive" -sdk iphonesimulator -destination="iOS Simulator" SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
Expand All @@ -55,6 +63,8 @@ archive:
xcodebuild -create-xcframework -framework $(SIMULATOR_ARCHIVE_PATH)$(AEPSIGNAL_TARGET_NAME).framework -framework $(IOS_ARCHIVE_PATH)$(AEPSIGNAL_TARGET_NAME).framework -output ./build/$(AEPSIGNAL_TARGET_NAME).xcframework
xcodebuild -create-xcframework -framework $(SIMULATOR_ARCHIVE_PATH)AEPRulesEngine.framework -framework $(IOS_ARCHIVE_PATH)AEPRulesEngine.framework -output ./build/AEPRulesEngine.xcframework

# Targets - CI steps

clean:
rm -rf ./build

Expand All @@ -70,8 +80,54 @@ lint:
checkFormat:
swiftformat . --lint --swiftversion 5.1


loc:
# use the following brew command to install cloc
# brew install cloc
cloc AEPSignal/Sources AEPIdentity/Sources AEPLifecycle/Sources AEPCore/Sources AEPServices/Sources

latest-version:
(which jq)
(echo "AEPServices - " && pod spec cat AEPServices | jq '.version' | tr -d '"')
(echo "AEPCore - " && pod spec cat AEPCore | jq '.version' | tr -d '"')
(echo "AEPIdentity - " && pod spec cat AEPIdentity | jq '.version' | tr -d '"')
(echo "AEPLifecycle - " && pod spec cat AEPLifecycle | jq '.version' | tr -d '"')
(echo "AEPSignal - " && pod spec cat AEPSignal | jq '.version' | tr -d '"')

version-podspec-local:
(which jq)
(echo "AEPServices - ${BLUE}$(shell pod ipc spec AEPServices.podspec | jq '.version' | tr -d '"')${NC}")
(echo "AEPCore - ${BLUE}$(shell pod ipc spec AEPCore.podspec | jq '.version' | tr -d '"')${NC}")
(echo "AEPIdentity - ${BLUE}$(shell pod ipc spec AEPIdentity.podspec | jq '.version' | tr -d '"')${NC}")
(echo "AEPLifecycle - ${BLUE}$(shell pod ipc spec AEPLifecycle.podspec | jq '.version' | tr -d '"')${NC}")
(echo "AEPSignal - ${BLUE}$(shell pod ipc spec AEPSignal.podspec | jq '.version' | tr -d '"')${NC}")

podspec-local-dependency-version:
(which jq)
(echo "AEPCore:")
(echo " -AEPService: $(shell pod ipc spec AEPCore.podspec | jq '.dependencies.AEPServices[0]'| tr -d '"')")
(echo " -AEPRulesEngine: $(shell pod ipc spec AEPCore.podspec | jq '.dependencies.AEPRulesEngine[0]'| tr -d '"')")
(echo "AEPIdentity:")
(echo " -AEPCore: $(shell pod ipc spec AEPIdentity.podspec | jq '.dependencies.AEPCore[0]'| tr -d '"')")
(echo "AEPLifecycle:")
(echo " -AEPCore: $(shell pod ipc spec AEPLifecycle.podspec | jq '.dependencies.AEPCore[0]'| tr -d '"')")
(echo "AEPSignal:")
(echo " -AEPCore: $(shell pod ipc spec AEPSignal.podspec | jq '.dependencies.AEPCore[0]'| tr -d '"')")

version-source-code:
(echo "AEPCore - ${BLUE}$(shell cat ./AEPCore/Sources/core/CoreConstants.swift | egrep '\s*EXTENSION_VERSION\s*=\s*\"(.*)\"' | ruby -e "puts gets.scan(/\"(.*)\"/)[0] " | tr -d '"')${NC}")
(echo "AEPIdentity - ${BLUE}$(shell cat ./AEPIdentity/Sources/IdentityConstants.swift | egrep '\s*EXTENSION_VERSION\s*=\s*\"(.*)\"' | ruby -e "puts gets.scan(/\"(.*)\"/)[0] " | tr -d '"')${NC}")
(echo "AEPLifecycle - ${BLUE}$(shell cat ./AEPLifecycle/Sources/LifecycleConstants.swift | egrep '\s*EXTENSION_VERSION\s*=\s*\"(.*)\"' | ruby -e "puts gets.scan(/\"(.*)\"/)[0] " | tr -d '"')${NC}")
(echo "AEPSignal - ${BLUE}$(shell cat ./AEPSignal/Sources/SignalConstants.swift | egrep '\s*EXTENSION_VERSION\s*=\s*\"(.*)\"' | ruby -e "puts gets.scan(/\"(.*)\"/)[0] " | tr -d '"')${NC}")

# make check-version VERSION=3.0.0-beta.3
check-version:
(sh ./script/version.sh $(VERSION))

test-SPM-integration:
(sh ./script/test-SPM.sh)

test-podspec:
(sh ./script/test-podspec.sh)

pod-lint:
(pod lib lint --allow-warnings --verbose --swift-version=5.1)
Loading

0 comments on commit 1fe977a

Please sign in to comment.