jfrog / cocoapods-art

CocoaPods Plugin to work against Artifactory Repository
Apache License 2.0
58 stars 28 forks source link

Cocoapods with multiple podspecs not supported. #54

Open JonathanNix opened 3 years ago

JonathanNix commented 3 years ago

Apologies if this is supported and I am missing something, but cocoapods-art appears to not work with Cocoapods that have multiple podspecs. The main one being Firebase iOS SDK

When adding or updating podspecs, cocoapods-art will change the specs' source fields to point to the pkg location in Artifactory as expected. Here is a snippet of what a typical Firebase iOS SDK sub podspec looks like before this change:

{
  "name": "FirebaseAnalyticsInterop",
  "version": "1.5.0",
  "summary": "Interfaces that allow other Firebase SDKs to use Analytics functionality.",
  "description": "Not for public use.\n\nA set of protocols that other Firebase SDKs can use to interoperate with FirebaseAnalytics in a\nsafe and reliable manner.",
  "homepage": "https://firebase.google.com",
  "license": {
    "type": "Apache",
    "file": "LICENSE"
  },
  "authors": "Google, Inc.",
  "source": {
    "git": "https://github.com/firebase/firebase-ios-sdk.git",
    "tag": "AnalyticsInterop-1.5.0"
  },
  "social_media_url": "https://twitter.com/Firebase",
  "platforms": {
    "ios": "8.0",
    "osx": "10.11",
    "tvos": "10.0",
    "watchos": "6.0"
  },
  "source_files": "Interop/Analytics/**/*.h",
  "public_header_files": "Interop/Analytics/Public/*.h"
}

FirebaseAnalyticsInterop points to the same git repo as most of the other sub podsepcs. The only difference is the tag. Because of this, when cocoapods-art pulls down any of the Firebase iOS SDK podspecs, it updates their source fields to the same thing:

"source": {
  "http": "https://myrepo.com/api/pods/cocoapods-art-approved/pod/pkg/Firebase/6.25.0",
  "type": "tgz"
}

Since multiple podspecs are are a part of the same overall Firebase version of 6.25.0, the pkg at that location will theoretically be overwritten every time a different sub podspec is deployed and will only reflect the last tar.gz that was uploaded.

Please let me know if any further info is needed. Thank you!