Skip to content

Commit

Permalink
Update Stagehand for Xcode 15
Browse files Browse the repository at this point in the history
  • Loading branch information
luispadron committed Jan 21, 2024
1 parent d4cc5b5 commit a59a647
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 49 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ on:
jobs:
xcode-build:
name: Xcode Build
runs-on: macOS-11
runs-on: macOS-13
strategy:
matrix:
platform: ['iOS_13']
platform: ['iOS_17']
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Bundle Install
run: bundle install --gemfile=Example/Gemfile
- name: Prepare Simulator Runtimes
Expand All @@ -33,10 +35,12 @@ jobs:
path: .build/derivedData/**/Logs/Test/*.xcresult
pod-lint:
name: Pod Lint
runs-on: macOS-11
runs-on: macOS-13
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Bundle Install
run: bundle install --gemfile=Example/Gemfile
- name: Pod Install
Expand All @@ -47,14 +51,16 @@ jobs:
run: bundle exec --gemfile=Example/Gemfile pod lib lint --verbose --fail-fast --include-podspecs=Stagehand.podspec StagehandTesting.podspec
spm:
name: SPM Build
runs-on: macOS-11
runs-on: macOS-13
strategy:
matrix:
platform: ['iOS_13']
platform: ['iOS_17']
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Prepare Simulator Runtimes
run: Scripts/github/prepare-simulators.sh ${{ matrix.platform }}
- name: Build
Expand All @@ -63,6 +69,8 @@ jobs:
name: Bazel
runs-on: macOS-13
steps:
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Checkout Repo
uses: actions/checkout@v2
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use_frameworks!

platform :ios, '12.0'
platform :ios, '14.0'

target 'Stagehand_Example' do
pod 'Stagehand', :path => '../'
Expand Down
30 changes: 15 additions & 15 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
PODS:
- iOSSnapshotTestCase (6.2.0):
- iOSSnapshotTestCase/SwiftSupport (= 6.2.0)
- iOSSnapshotTestCase/Core (6.2.0)
- iOSSnapshotTestCase/SwiftSupport (6.2.0):
- iOSSnapshotTestCase (8.0.0):
- iOSSnapshotTestCase/SwiftSupport (= 8.0.0)
- iOSSnapshotTestCase/Core (8.0.0)
- iOSSnapshotTestCase/SwiftSupport (8.0.0):
- iOSSnapshotTestCase/Core
- SnapshotTesting (1.7.0)
- Stagehand (4.0.0)
- StagehandTesting/iOSSnapshotTestCase (4.0.0):
- iOSSnapshotTestCase (~> 6.1)
- Stagehand (= 4.0.0)
- StagehandTesting/SnapshotTesting (4.0.0):
- Stagehand (5.0.0)
- StagehandTesting/iOSSnapshotTestCase (5.0.0):
- iOSSnapshotTestCase (~> 8.0)
- Stagehand (= 5.0.0)
- StagehandTesting/SnapshotTesting (5.0.0):
- SnapshotTesting (~> 1.7)
- Stagehand (= 4.0.0)
- Stagehand (= 5.0.0)

DEPENDENCIES:
- SnapshotTesting (= 1.7.0)
Expand All @@ -31,11 +31,11 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
iOSSnapshotTestCase: 9ab44cb5aa62b84d31847f40680112e15ec579a6
iOSSnapshotTestCase: a670511f9ee3829c2b9c23e6e68f315fd7b6790f
SnapshotTesting: 273b614fcc60fac7d9f613f6648afa91a7da36be
Stagehand: 29ee26a0690ebf90a5ea45e86fd88b865baf5403
StagehandTesting: 3354a5300e7fc6d1ba9ab182762feff9e80cb6de
Stagehand: fc3f93447b852db22e34c08f5383f3544ef7b8ee
StagehandTesting: ef37187c43390a3f3dd2371ebad07133eb1399e5

PODFILE CHECKSUM: b4841bd82e57283ff97d83f4bb89137cc01f6102
PODFILE CHECKSUM: 2d1b0e07675666ae7518e07f18a32914dd33978a

COCOAPODS: 1.11.3
COCOAPODS: 1.14.3
5 changes: 2 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.0.1
// swift-tools-version:5.8

//
// Copyright 2020 Square Inc.
Expand Down Expand Up @@ -29,6 +29,7 @@ let package = Package(
targets: ["Stagehand"]
),
],
dependencies: [],
targets: [
.target(
name: "Stagehand",
Expand All @@ -38,5 +39,3 @@ let package = Package(
],
swiftLanguageVersions: [.v5]
)

let version = Version(4, 0, 0)
23 changes: 5 additions & 18 deletions Scripts/build.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ enum TaskError: Error {
}

enum Platform: String, CustomStringConvertible {
case iOS_13
case iOS_17

var destination: String {
switch self {
case .iOS_13:
return "platform=iOS Simulator,OS=13.7,name=iPhone 11 Pro"
case .iOS_17:
return "platform=iOS Simulator,OS=17.0,name=iPhone 14 Pro"
}
}

Expand Down Expand Up @@ -80,7 +80,7 @@ enum Task: String, CustomStringConvertible {
var project: String? {
switch self {
case .spm:
return "generated/Stagehand.xcodeproj"
return nil
case .xcode:
return nil
}
Expand All @@ -91,16 +91,7 @@ enum Task: String, CustomStringConvertible {
case .xcode:
return "Stagehand Demo App"
case .spm:
return "Stagehand-Package"
}
}

var shouldGenerateXcodeProject: Bool {
switch self {
case .spm:
return true
case .xcode:
return false
return "Stagehand"
}
}

Expand Down Expand Up @@ -131,10 +122,6 @@ guard let task = Task(rawValue: rawTask) else {
throw TaskError.code(1)
}

if task.shouldGenerateXcodeProject {
try execute(commandPath: "/usr/bin/swift", arguments: ["package", "generate-xcodeproj", "--output=generated/"])
}

guard let platform = Platform(rawValue: rawPlatform) else {
print("Received unknown platform \"\(rawPlatform)\"")
throw TaskError.code(1)
Expand Down
6 changes: 3 additions & 3 deletions Stagehand.podspec
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Pod::Spec.new do |s|
s.name = 'Stagehand'
s.version = '4.0.0'
s.version = '5.0.0'
s.summary = 'Modern, type-safe API for building animations on iOS'
s.homepage = 'https://github.com/CashApp/Stagehand'
s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' }
s.author = 'Square'
s.source = { :git => 'https://github.com/CashApp/Stagehand.git', :tag => s.version.to_s }

s.ios.deployment_target = '12.0'
s.ios.deployment_target = '14.0'

s.swift_version = '5.0.1'
s.swift_version = '5.8'

s.source_files = 'Sources/Stagehand/**/*'

Expand Down
8 changes: 4 additions & 4 deletions StagehandTesting.podspec
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Pod::Spec.new do |s|
s.name = 'StagehandTesting'
s.version = '4.0.0'
s.version = '5.0.0'
s.summary = 'Utilities for snapshot testing animations created using the Stagehand framework'
s.homepage = 'https://github.com/CashApp/Stagehand'
s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' }
s.author = 'Square'
s.source = { :git => 'https://github.com/CashApp/Stagehand.git', :tag => s.version.to_s }

s.ios.deployment_target = '12.0'
s.ios.deployment_target = '14.0'

s.swift_version = '5.0.1'
s.swift_version = '5.8'

# The dependency on Stagehand is pinned to the same version as StagehandTesting. This is because
# StagehandTesting depends on internal methods inside Stagehand, so the normal rules of semantic
Expand All @@ -24,7 +24,7 @@ Pod::Spec.new do |s|
'Sources/StagehandTesting/iOSSnapshotTestCase/**/*.swift',
]

ss.dependency 'iOSSnapshotTestCase', '~> 6.1'
ss.dependency 'iOSSnapshotTestCase', '~> 8.0'
end

s.subspec 'SnapshotTesting' do |ss|
Expand Down

0 comments on commit a59a647

Please sign in to comment.