Giter Club home page Giter Club logo

Comments (20)

jwilling avatar jwilling commented on August 29, 2024

The Podspec for 1.3 seems to be pointing to the 1.3 tag correctly. Am I missing something?

from svpulltorefresh.

jcoleman avatar jcoleman commented on August 29, 2024

See https://github.com/samvermette/SVPullToRefresh/blob/0.3/SVPullToRefresh.podspec -- the source is configured to used 0.2. (This is also the case in master.)

from svpulltorefresh.

jwilling avatar jwilling commented on August 29, 2024

Ahh, I was looking at the CocoaPods' spec repo, which has the correct 0.3 version tag set up.

On Sep 7, 2012, at 12:06 PM, James Coleman [email protected] wrote:

See https://github.com/samvermette/SVPullToRefresh/blob/0.3/SVPullToRefresh.podspec -- the source is configured to used 0.2. (This is also the case in master.)


Reply to this email directly or view it on GitHub.

from svpulltorefresh.

jcoleman avatar jcoleman commented on August 29, 2024

And certainly that's the most important one, I was just noting that the actual repo didn't.

from svpulltorefresh.

samvermette avatar samvermette commented on August 29, 2024

I'm still puzzled at what's the best way to work with CocoaPods. I used to have access to the official repo but ended up leaving the group because I kept getting an insane amount of notifications every day. Maybe that's fixed with GitHub's new notification system...

Is there a way I can have my podspec file to always point to the latest commit? Or at least make it so that every time I add a tag to my repository, it automatically update/push a podspec file that reflects this new version?

from svpulltorefresh.

jwilling avatar jwilling commented on August 29, 2024

Yes, the email spam has been resolved now. Unfortunately, there's no way to create an automatic podspec, but it's really easy to update a new one for each tag. If you specifically want the latest commit, there's always :head.

from svpulltorefresh.

samvermette avatar samvermette commented on August 29, 2024

@jwilling thanks. Where would I put :head? Like this?

s.source   = { :git => 'https://github.com/samvermette/SVPullToRefresh', :head }

from svpulltorefresh.

jwilling avatar jwilling commented on August 29, 2024

To tell you the truth, I've never used :head from within podspecs themselves, only through a Podfile. Might be better to get in touch with someone more knowledgeable than I about that.

Come to think of it, using :head might be unnecessary. If you leave out the specific version tag, and just provide the git repo I think it always uses the most recent version. I could be (and probably am) wrong about that, though.

from svpulltorefresh.

samvermette avatar samvermette commented on August 29, 2024

@jwilling okay will try that, thanks. Can you add me to the CocoaPodspecs group again please?

from svpulltorefresh.

jwilling avatar jwilling commented on August 29, 2024

@samvermette I'm a member there, but not an admin. Best get in contact with @alloy, @irrationalfab, or another admin to join again.

from svpulltorefresh.

jcoleman avatar jcoleman commented on August 29, 2024

I think that (as I understand it) :head may be the way to go. The benefit to having the Podspec in the project repo itself (as opposed to merely in the cocoapods repo) is that then someone can easily specify that they'd like to use a specific tag, branch, or commit even if that tag/branch/commit doesn't (yet) have an official Podsepc in the cocoapods repo.

from svpulltorefresh.

fabiopelosin avatar fabiopelosin commented on August 29, 2024

@samvermette I've added you to the group.

Is there a way I can have my podspec file to always point to the latest commit? Or at least make it so that every time I add a tag to my repository, it automatically update/push a podspec file that reflects this new version?

You can do something like:

Pod::Spec.new do |s|
  s.name     = 'SVPullToRefresh'
  s.version  = '0.3'
  s.source   = { :git => 'https://github.com/samvermette/SVPullToRefresh.git',
                 :tag => "#{s.version}" }
  # [redacted]
end

Anyway at the end of the day for releasing a lib under CocoaPods one should still do those manual steps:

  • git tag
  • edit the podspec to indicate the new version
  • pod push master (if you have push access)

However one day or the other I should do a companion command line tool for automating the management of pods with git.

To tell you the truth, I've never used :head from within podspecs themselves, only through a Podfile. Might be better to get in touch with someone more knowledgeable than I about that.

@jwilling You should never do this and there should never be the need to.

from svpulltorefresh.

jwilling avatar jwilling commented on August 29, 2024

@irrationalfab If I recall correctly that's what Eloy told me to do a couple months ago when I had the same question as @samvermette. Have things changed since then?

from svpulltorefresh.

fabiopelosin avatar fabiopelosin commented on August 29, 2024

@irrationalfab If I recall correctly that's what Eloy told me to do a couple months ago when I had the same question as @samvermette. Have things changed since then?

I doubt that @alloy told you so. I guess that he meant in a Podfile, but there was a misunderstanding. Anyway you should never use the head option to define the source of a podspec. Moreover if you want a head pointing podspec (for your usage) you can do:

s.source   = { :git => 'https://github.com/samvermette/SVPullToRefresh' }

Finally, now that I think about it:

s.source   = { :git => 'https://github.com/samvermette/SVPullToRefresh', :head }

Is not even valid ruby syntax and should crash (it is a hash key without a value).

from svpulltorefresh.

jwilling avatar jwilling commented on August 29, 2024

@irrationalfab Ahh, I thought you were referring to this:

If you leave out the specific version tag, and just provide the git repo I think it always uses the most recent version.

from svpulltorefresh.

samvermette avatar samvermette commented on August 29, 2024

@irrationalfab @jwilling thanks for the help guys.

Another unanswered interrogation I have is: do I have to include the podspec file in my project repository as well? I understand that the one that matters is the one I push to CocoaPods/Specs, but I have seen many dev include it into their own project repo as well, yet I see no reason to since the tags are what link my project to the podspec... does that make sense?

from svpulltorefresh.

jcoleman avatar jcoleman commented on August 29, 2024

@samvermette: As I mentioned earlier, the benefit to having the Podspec in the project repository itself (as opposed to merely in the cocoapods repo) is that then someone can easily specify that they'd like to use a specific tag, branch, or commit even if that tag/branch/commit doesn't (yet) have an official Podsepc in the cocoapods repo.

from svpulltorefresh.

fabiopelosin avatar fabiopelosin commented on August 29, 2024

Another good reason are locally sourced pods.

Consider that while using a pod you find an enhancement that you want to perform. It is then possible to checkout a working copy of the library and change the dependency in the Podfile file to:

pod 'SVPullToRefresh', :local => '~/path/to/my/clone/SVPullToRefresh'

Using this option the Pods project links to the files contained in this folder so it is possible to perform source control and contribute back. This option requires a podspec in the root of the folder.

from svpulltorefresh.

jcoleman avatar jcoleman commented on August 29, 2024

To add on to what @irrationalfab noted, it also helps if you fork the project. While developing changes to it, you need to be able to run your project against those files. And if the podspec is in the repo, then it's easy to just point the Podfile dependency at your fork while you develop the changes.

from svpulltorefresh.

samvermette avatar samvermette commented on August 29, 2024

Thanks all. I have a better understanding of how podspecs work now and will make sure to take better care of versioning controlling of my repos and their podspec.

from svpulltorefresh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.