Skip to content

Commit

Permalink
Merge pull request #979 from praveek/dev-v5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
praveek committed Nov 30, 2023
2 parents b63ad3a + b56be23 commit 55f0891
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ jobs:
- name: Install cocoapods
run: gem install cocoapods

- name: Install xcodegen
run: brew install xcodegen

- name: Check version in Podspec
run: |
set -eo pipefail
Expand Down
58 changes: 46 additions & 12 deletions Script/test-podspec.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,27 @@ mkdir -p $PROJECT_NAME && cd $PROJECT_NAME

# Create a new Xcode project.
swift package init
swift package generate-xcodeproj

# Use Xcodegen to generate the project.
echo "
name: $PROJECT_NAME
options:
bundleIdPrefix: $PROJECT_NAME
targets:
$PROJECT_NAME:
type: framework
sources: Sources
platform: iOS
deploymentTarget: "12.0"
settings:
GENERATE_INFOPLIST_FILE: YES
" >>project.yml

xcodegen generate

# Create a Podfile with our pod as dependency.
echo "
platform :ios, '11.0'
platform :ios, '12.0'
target '$PROJECT_NAME' do
use_frameworks!
pod 'AEPCore', :path => '../AEPCore.podspec'
Expand All @@ -32,33 +48,51 @@ pod install

# Archive for generic iOS device
echo '############# Archive for generic iOS device ###############'
xcodebuild archive -scheme TestProject-Package -workspace TestProject.xcworkspace -destination 'generic/platform=iOS'
xcodebuild archive -scheme TestProject -workspace TestProject.xcworkspace -destination 'generic/platform=iOS'

# Build for generic iOS device
echo '############# Build for generic iOS device ###############'
xcodebuild clean build -scheme TestProject-Package -workspace TestProject.xcworkspace -destination 'generic/platform=iOS'
xcodebuild clean build -scheme TestProject -workspace TestProject.xcworkspace -destination 'generic/platform=iOS'

# Archive for x86_64 simulator
echo '############# Archive for simulator ###############'
xcodebuild archive -scheme TestProject-Package -workspace TestProject.xcworkspace -destination 'generic/platform=iOS Simulator'
xcodebuild archive -scheme TestProject -workspace TestProject.xcworkspace -destination 'generic/platform=iOS Simulator'

# Build for x86_64 simulator
echo '############# Build for simulator ###############'
xcodebuild clean build -scheme TestProject-Package -workspace TestProject.xcworkspace -destination 'generic/platform=iOS Simulator'
xcodebuild clean build -scheme TestProject -workspace TestProject.xcworkspace -destination 'generic/platform=iOS Simulator'

# Clean up.
cd ../
rm -rf $PROJECT_NAME

# tvOS
mkdir -p $PROJECT_NAME && cd $PROJECT_NAME

# Create a new Xcode project.
swift package init
swift package generate-xcodeproj

# Use Xcodegen to generate the project.
echo "
name: $PROJECT_NAME
options:
bundleIdPrefix: $PROJECT_NAME
targets:
$PROJECT_NAME:
type: framework
sources: Sources
platform: tvOS
deploymentTarget: "12.0"
settings:
GENERATE_INFOPLIST_FILE: YES
" >>project.yml

xcodegen generate


# Create a Podfile with our pod as dependency.
echo "
platform :tvos, '11.0'
platform :tvos, '12.0'
target '$PROJECT_NAME' do
use_frameworks!
pod 'AEPCore', :path => '../AEPCore.podspec'
Expand All @@ -73,19 +107,19 @@ end
pod install
# Archive for generic tvOS device
echo '############# Archive for generic tvOS device ###############'
xcodebuild archive -scheme TestProject-Package -workspace TestProject.xcworkspace -destination 'generic/platform=tvOS'
xcodebuild archive -scheme TestProject -workspace TestProject.xcworkspace -destination 'generic/platform=tvOS'

# Build for generic tvOS device
echo '############# Build for generic tvOS device ###############'
xcodebuild build -scheme TestProject-Package -workspace TestProject.xcworkspace -destination 'generic/platform=tvOS'
xcodebuild build -scheme TestProject -workspace TestProject.xcworkspace -destination 'generic/platform=tvOS'

# Archive for generic tvOS device
echo '############# Archive for generic tvOS device ###############'
xcodebuild archive -scheme TestProject-Package -workspace TestProject.xcworkspace -destination 'generic/platform=tvOS Simulator'
xcodebuild archive -scheme TestProject -workspace TestProject.xcworkspace -destination 'generic/platform=tvOS Simulator'

# Build for generic tvOS simulator
echo '############# Build for x86_64 simulator ###############'
xcodebuild build -scheme TestProject-Package -workspace TestProject.xcworkspace -destination 'generic/platform=tvOS Simulator'
xcodebuild build -scheme TestProject -workspace TestProject.xcworkspace -destination 'generic/platform=tvOS Simulator'

# Clean up.
cd ../
Expand Down

0 comments on commit 55f0891

Please sign in to comment.