Skip to content

Commit 51caeab

Browse files
authored
Fix pod lib lint error with Podspecs with local variables (#557)
* Fix pod lib lint error with Podspecs with local variables * remove unused sdk versions
1 parent 6723940 commit 51caeab

File tree

14 files changed

+73
-50
lines changed

14 files changed

+73
-50
lines changed

AWSPluginsCore.podspec

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
77
#
88

9-
load 'build-support/dependencies.rb'
9+
# Version definitions
10+
$AMPLIFY_VERSION = '1.0.1'
11+
$AMPLIFY_RELEASE_TAG = "v#{$AMPLIFY_VERSION}"
12+
13+
$AWS_SDK_VERSION = '2.13.4'
14+
$OPTIMISTIC_AWS_SDK_VERSION = "~> #{$AWS_SDK_VERSION}"
1015

1116
Pod::Spec.new do |s|
1217
s.name = 'AWSPluginsCore'
@@ -19,18 +24,18 @@ Pod::Spec.new do |s|
1924
s.homepage = 'https://github.com/aws-amplify/amplify-ios'
2025
s.license = 'Apache License, Version 2.0'
2126
s.author = { 'Amazon Web Services' => 'amazonwebservices' }
22-
s.source = { :git => 'https://github.com/aws-amplify/amplify-ios.git', :tag => release_tag() }
27+
s.source = { :git => 'https://github.com/aws-amplify/amplify-ios.git', :tag => $AMPLIFY_RELEASE_TAG }
2328

2429
s.platform = :ios, '11.0'
2530
s.swift_version = '5.0'
2631

2732
s.source_files = 'AmplifyPlugins/Core/AWSPluginsCore/**/*.swift'
2833

2934
s.dependency 'Amplify', $AMPLIFY_VERSION
30-
s.dependency 'AWSMobileClient', optimistic_version($AWS_SDK_VERSION)
35+
s.dependency 'AWSMobileClient', $OPTIMISTIC_AWS_SDK_VERSION
3136

3237
# This is technically redundant, but adding it here allows Xcode to find it
3338
# during initial indexing and prevent build errors after a fresh install
34-
s.dependency 'AWSCore', optimistic_version($AWS_SDK_VERSION)
39+
s.dependency 'AWSCore', $OPTIMISTIC_AWS_SDK_VERSION
3540

3641
end

AWSPredictionsPlugin.podspec

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
load 'build-support/dependencies.rb'
1+
# Version definitions
2+
$AMPLIFY_VERSION = '1.0.1'
3+
$AMPLIFY_RELEASE_TAG = "v#{$AMPLIFY_VERSION}"
4+
5+
$AWS_SDK_VERSION = '2.13.4'
6+
$OPTIMISTIC_AWS_SDK_VERSION = "~> #{$AWS_SDK_VERSION}"
27

38
Pod::Spec.new do |s|
49
s.name = 'AWSPredictionsPlugin'
@@ -11,24 +16,24 @@ Pod::Spec.new do |s|
1116
s.homepage = 'https://github.com/aws-amplify/amplify-ios'
1217
s.license = 'Apache License, Version 2.0'
1318
s.author = { 'Amazon Web Services' => 'amazonwebservices' }
14-
s.source = { :git => 'https://github.com/aws-amplify/amplify-ios.git', :tag => release_tag() }
19+
s.source = { :git => 'https://github.com/aws-amplify/amplify-ios.git', :tag => $AMPLIFY_RELEASE_TAG }
1520

1621
s.platform = :ios, '13.0'
1722
s.swift_version = '5.0'
1823

1924
s.source_files = 'AmplifyPlugins/Predictions/AWSPredictionsPlugin/**/*.swift'
2025

21-
s.dependency 'AWSComprehend', optimistic_version($AWS_SDK_VERSION)
26+
s.dependency 'AWSComprehend', $OPTIMISTIC_AWS_SDK_VERSION
2227
s.dependency 'AWSPluginsCore', $AMPLIFY_VERSION
23-
s.dependency 'AWSPolly', optimistic_version($AWS_SDK_VERSION)
24-
s.dependency 'AWSRekognition', optimistic_version($AWS_SDK_VERSION)
25-
s.dependency 'AWSTextract', optimistic_version($AWS_SDK_VERSION)
26-
s.dependency 'AWSTranscribeStreaming', optimistic_version($AWS_SDK_VERSION)
27-
s.dependency 'AWSTranslate', optimistic_version($AWS_SDK_VERSION)
28+
s.dependency 'AWSPolly', $OPTIMISTIC_AWS_SDK_VERSION
29+
s.dependency 'AWSRekognition', $OPTIMISTIC_AWS_SDK_VERSION
30+
s.dependency 'AWSTextract', $OPTIMISTIC_AWS_SDK_VERSION
31+
s.dependency 'AWSTranscribeStreaming', $OPTIMISTIC_AWS_SDK_VERSION
32+
s.dependency 'AWSTranslate', $OPTIMISTIC_AWS_SDK_VERSION
2833
s.dependency 'CoreMLPredictionsPlugin', $AMPLIFY_VERSION
2934

3035
# This is technically redundant, but adding it here allows Xcode to find it
3136
# during initial indexing and prevent build errors after a fresh install
32-
s.dependency 'AWSCore', optimistic_version($AWS_SDK_VERSION)
37+
s.dependency 'AWSCore', $OPTIMISTIC_AWS_SDK_VERSION
3338

3439
end

Amplify.podspec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
77
#
88

9-
load 'build-support/dependencies.rb'
9+
# Version definitions
10+
$AMPLIFY_VERSION = '1.0.1'
11+
$AMPLIFY_RELEASE_TAG = "v#{$AMPLIFY_VERSION}"
1012

1113
Pod::Spec.new do |s|
1214
s.name = 'Amplify'
@@ -18,7 +20,7 @@ Pod::Spec.new do |s|
1820
s.homepage = 'https://github.com/aws-amplify/amplify-ios'
1921
s.license = 'Apache License, Version 2.0'
2022
s.author = { 'Amazon Web Services' => 'amazonwebservices' }
21-
s.source = { :git => 'https://github.com/aws-amplify/amplify-ios.git', :tag => release_tag() }
23+
s.source = { :git => 'https://github.com/aws-amplify/amplify-ios.git', :tag => $AMPLIFY_RELEASE_TAG }
2224

2325
s.platform = :ios, '11.0'
2426
s.swift_version = '5.0'

AmplifyPlugins.podspec

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
77
#
88

9-
load 'build-support/dependencies.rb'
9+
# Version definitions
10+
$AMPLIFY_VERSION = '1.0.1'
11+
$AMPLIFY_RELEASE_TAG = "v#{$AMPLIFY_VERSION}"
12+
13+
$AWS_SDK_VERSION = '2.13.4'
14+
$OPTIMISTIC_AWS_SDK_VERSION = "~> #{$AWS_SDK_VERSION}"
1015

1116
Pod::Spec.new do |s|
1217
s.name = 'AmplifyPlugins'
@@ -18,7 +23,7 @@ Pod::Spec.new do |s|
1823
s.homepage = 'https://github.com/aws-amplify/amplify-ios'
1924
s.license = 'Apache License, Version 2.0'
2025
s.author = { 'Amazon Web Services' => 'amazonwebservices' }
21-
s.source = { :git => 'https://github.com/aws-amplify/amplify-ios.git', :tag => release_tag() }
26+
s.source = { :git => 'https://github.com/aws-amplify/amplify-ios.git', :tag => $AMPLIFY_RELEASE_TAG }
2227

2328
s.platform = :ios, '11.0'
2429
s.swift_version = '5.0'
@@ -27,7 +32,7 @@ Pod::Spec.new do |s|
2732

2833
# This is technically redundant, but adding it here allows Xcode to find it
2934
# during initial indexing and prevent build errors after a fresh install
30-
s.dependency 'AWSCore', optimistic_version($AWS_SDK_VERSION)
35+
s.dependency 'AWSCore', $OPTIMISTIC_AWS_SDK_VERSION
3136

3237
s.subspec 'AWSAPIPlugin' do |ss|
3338
ss.source_files = 'AmplifyPlugins/API/AWSAPICategoryPlugin/**/*.swift'
@@ -37,11 +42,11 @@ Pod::Spec.new do |s|
3742

3843
s.subspec 'AWSCognitoAuthPlugin' do |ss|
3944
ss.source_files = 'AmplifyPlugins/Auth/AWSCognitoAuthPlugin/**/*.swift'
40-
ss.dependency 'AWSMobileClient', optimistic_version($AWS_SDK_VERSION)
45+
ss.dependency 'AWSMobileClient', $OPTIMISTIC_AWS_SDK_VERSION
4146

4247
# This is technically redundant, but adding it here allows Xcode to find it
4348
# during initial indexing and prevent build errors after a fresh install
44-
s.dependency 'AWSAuthCore', optimistic_version($AWS_SDK_VERSION)
49+
s.dependency 'AWSAuthCore', $OPTIMISTIC_AWS_SDK_VERSION
4550

4651
end
4752

@@ -52,12 +57,12 @@ Pod::Spec.new do |s|
5257

5358
s.subspec 'AWSPinpointAnalyticsPlugin' do |ss|
5459
ss.source_files = 'AmplifyPlugins/Analytics/AWSPinpointAnalyticsPlugin/**/*.swift'
55-
ss.dependency 'AWSPinpoint', optimistic_version($AWS_SDK_VERSION)
60+
ss.dependency 'AWSPinpoint', $OPTIMISTIC_AWS_SDK_VERSION
5661
end
5762

5863
s.subspec 'AWSS3StoragePlugin' do |ss|
5964
ss.source_files = 'AmplifyPlugins/Storage/AWSS3StoragePlugin/**/*.swift'
60-
ss.dependency 'AWSS3', optimistic_version($AWS_SDK_VERSION)
65+
ss.dependency 'AWSS3', $OPTIMISTIC_AWS_SDK_VERSION
6166
end
6267

6368
end

AmplifyPlugins/API/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ target "HostApp" do
2525
include_test_utilities!
2626
pod 'AmplifyTestCommon', :path => '../../'
2727
pod 'Amplify', :path => '../../'
28-
pod "AWSMobileClient", optimistic_version($AWS_SDK_VERSION)
28+
pod "AWSMobileClient", $OPTIMISTIC_AWS_SDK_VERSION
2929

3030
target "AWSAPICategoryPluginTestCommon" do
3131
inherit! :complete

AmplifyPlugins/Analytics/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include_build_tools!
88
target 'AWSPinpointAnalyticsPlugin' do
99
pod 'Amplify', :path => '../../'
1010
pod 'AWSPluginsCore', :path => '../../'
11-
pod "AWSPinpoint", optimistic_version($AWS_SDK_VERSION)
11+
pod "AWSPinpoint", $OPTIMISTIC_AWS_SDK_VERSION
1212
end
1313

1414
target "HostApp" do

AmplifyPlugins/Auth/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include_build_tools!
88
target 'AWSCognitoAuthPlugin' do
99
pod 'Amplify', :path => '../../'
1010
pod 'AWSPluginsCore', :path => '../../'
11-
pod "AWSMobileClient", optimistic_version($AWS_SDK_VERSION)
11+
pod "AWSMobileClient", $OPTIMISTIC_AWS_SDK_VERSION
1212

1313
target "AWSCognitoAuthPluginTests" do
1414
inherit! :complete

AmplifyPlugins/DataStore/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ target "HostApp" do
2424
include_test_utilities!
2525
pod 'AmplifyTestCommon', :path => '../../'
2626
pod 'Amplify', :path => '../../'
27-
pod "AWSMobileClient", optimistic_version($AWS_SDK_VERSION)
27+
pod "AWSMobileClient", $OPTIMISTIC_AWS_SDK_VERSION
2828

2929
target "AWSDataStoreCategoryPluginIntegrationTests" do
3030
inherit! :complete

AmplifyPlugins/Predictions/Podfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ include_build_tools!
88
target 'AWSPredictionsPlugin' do
99
pod 'Amplify', :path => '../../'
1010
pod 'AWSPluginsCore', :path => '../../'
11-
pod "AWSTranslate", optimistic_version($AWS_SDK_VERSION)
12-
pod "AWSRekognition", optimistic_version($AWS_SDK_VERSION)
13-
pod "AWSPolly", optimistic_version($AWS_SDK_VERSION)
14-
pod "AWSComprehend", optimistic_version($AWS_SDK_VERSION)
15-
pod "AWSTranscribeStreaming", optimistic_version($AWS_SDK_VERSION)
16-
pod "AWSTextract", optimistic_version($AWS_SDK_VERSION)
11+
pod "AWSTranslate", $OPTIMISTIC_AWS_SDK_VERSION
12+
pod "AWSRekognition", $OPTIMISTIC_AWS_SDK_VERSION
13+
pod "AWSPolly", $OPTIMISTIC_AWS_SDK_VERSION
14+
pod "AWSComprehend", $OPTIMISTIC_AWS_SDK_VERSION
15+
pod "AWSTranscribeStreaming", $OPTIMISTIC_AWS_SDK_VERSION
16+
pod "AWSTextract", $OPTIMISTIC_AWS_SDK_VERSION
1717
end
1818

1919
target 'CoreMLPredictionsPlugin' do

AmplifyPlugins/Storage/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include_build_tools!
88
target 'AWSS3StoragePlugin' do
99
pod 'Amplify', :path => '../../'
1010
pod 'AWSPluginsCore', :path => '../../'
11-
pod "AWSS3", optimistic_version($AWS_SDK_VERSION)
11+
pod "AWSS3", $OPTIMISTIC_AWS_SDK_VERSION
1212

1313
target "AWSS3StoragePluginTests" do
1414
inherit! :complete

0 commit comments

Comments
 (0)