Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do `pod trunk push` to replace an existing version of podspec

Tags:

cocoapods

I already did a pod trunk push for a podspec version. Can I push it again and overwrite the existing one? I tried it but it gives me this error.

$ pod trunk push Parse-iOS-SDK.podspec
Validating podspec
 -> Parse-iOS-SDK (1.2.21)

[!] Unable to accept duplicate entry for: Parse-iOS-SDK (1.2.21)

Is there a similar command like git push -f force push it?

Ref: http://guides.cocoapods.org/making/getting-setup-with-trunk

like image 896
Hlung Avatar asked Sep 01 '14 11:09

Hlung


2 Answers

It is now possible to do this by first deleting the pod, and then re-pushing it:

pod trunk delete NAME VERSION

Then

pod trunk push PODSPEC

There should be a really good reason to do so, however, and the best practice is to never delete versions but instead push new ones (what Keith said).

like image 137
David Airapetyan Avatar answered Nov 03 '22 21:11

David Airapetyan


2017 Edit: You can now delete pods on trunk, see this answer

Previous answer:

You cannot overwrite a spec using trunk. You should just push a new version with your changes. You can also submit a pull request to the specs repo but we recommend just pushing a new version.

like image 26
Keith Smiley Avatar answered Nov 03 '22 20:11

Keith Smiley