I am running a private pod. Spec has been created and I am running this command;
pod repo push WHCore WHCore.podspec --verbose
However right at the last minute spits this out;
* BUILD SUCCEEDED *
-> WHCore (0.0.1)
[!] The repo WHCore is not clean
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/command/repo/push.rb:109:in check_repo_status'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/command/repo/push.rb:43:inrun'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:271:in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/command.rb:50:inrun'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/bin/pod:33:in <top (required)>'
/usr/bin/pod:23:inload'
/usr/bin/pod:23:in `
That indicates that the WHCore repo is not clean. Iβm not sure what you mean is the problem here, please elaborate.
Can you elaborate what determines an un-cleaned repository? I have never heard of this before
Assuming you are using git for that repo, can you run git status? If the repo is clean it would say something like nothing to commit, working directory clean.
I get:
0.0.1
nothing to commit, working directory clean
On git status
Sorry, can you run git status --porcelain, thatβs the exact command it runs https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/command/repo/push.rb#L108.
Just run that command but it doesn't reply with anything
Well thatβs weird, because it checks wether or not the repo is clean by checking if there is any output at all. To be sure, can you perform the following?
$ irb
irb(main):001:0> `git status --porcelain 2>&1` == ''
=> true
Yes correct, I get => true as above example
Wow, Iβm not sure what is going on here then.
Can it be that you made any repo changes since? Can you run pod repo push WHCore WHCore.podspec --verbose once more to be sure?
It's a strange one, been pulling my hair out with this!
Tried but still the same, here is the pod spec (apart from company details which I have cut out);
s.license = { :type => 'Apache License, Version 2.0', :text => <<-LICENSE
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
LICENSE
}
# s.license = { :type => "MIT", :file => "FILE_LICENSE" }
# βββ Author Metadata βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ #
#
# Specify the authors of the library, with email addresses. Email addresses
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
# accepts just a name if you'd rather not provide an email address.
#
# Specify a social_media_url where others can refer to, for example a twitter
# profile URL.
#
s.author = "Adam Rush"
# Or just: s.author = ""
# s.authors = { "" => "" }
# s.social_media_url = "http://twitter.com/"
# βββ Platform Specifics βββββββββββββββββββββββββββββββββββββββββββββββββββββββ #
#
# If this Pod runs only on iOS or OS X, then specify the platform and
# the deployment target. You can optionally include the target after the platform.
#
# s.platform = :ios
s.platform = :ios, "7.0"
# When using multiple platforms
# s.ios.deployment_target = "5.0"
# s.osx.deployment_target = "10.7"
# βββ Source Location ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ #
#
# Specify the location from where the source should be retrieved.
# Supports git, hg, bzr, svn and HTTP.
#
s.source = { :git => "git@gitlab.*******-dev.local:ta-ios-dev/whcore.git", :tag => "0.0.1" }
# βββ Source Code ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ #
#
# CocoaPods is smart about how it includes source code. For source files
# giving a folder will include any h, m, mm, c & cpp files. For header
# files it will include any header in the folder.
# Not including the public_header_files will make all headers public.
#
s.source_files = "Classes", "WHCore/Classes/*.{h,m}"
s.source_files = "Classes", "ThirdParty/**/*.{h,m}"
s.exclude_files = "Classes/Exclude"
# s.public_header_files = "Classes/**/*.h"
# βββ Resources ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#
# s.resource = "icon.png"
# s.resources = "Resources/*.png"
# s.preserve_paths = "FilesToSave", "MoreFilesToSave"
# βββ Project Linking ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#
# s.framework = "Flurry, CrittercismSDK, Airship Min, AFNetworking"
# s.frameworks = "SomeFramework", "AnotherFramework"
# s.library = "iconv"
# s.libraries = "iconv", "xml2"
# βββ Project Settings βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.
s.requires_arc = true
# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
# s.dependency "JSONKit", "~> 1.4"
end
Doh! Itβs complaining about the spec-repo to which you are trying to push the spec. My bad.
So if you change to ~/.cocoapods/repos/WHCore and run git status there, it should probably show the real issue.
Perfect!
Thanks so much :) _grabs a coffee & breathes_
We probably should print out the path of the unclean repo to make it clearer
@segiddins :+1:
Great :+1:
clean = Dir.chdir(repo_dir) { `git status --porcelain 2>&1` } == ''
The validation here is not reliable if the user prefixes the pod command with proxychains command since it outputs extra log like [proxychains] DLL init to stdout:
proxychains4 irb
[proxychains] config file found: /Users/dismory/.proxychains/proxychains.conf
[proxychains] preloading /usr/local/Cellar/proxychains-ng/4.7/lib/libproxychains4.dylib
[proxychains] DLL init
[proxychains] DLL init
2.0.0-p481 :001 > clean = Dir.chdir("../../.cocoapods/repos/master") { `git status --porcelain 2>&1` } == ''
[proxychains] DLL init
=> false
2.0.0-p481 :002 >
@dismory I have encountered this problemοΌthanks
i have deleted the repo and add repo, it's resolved!
Doh! Itβs complaining about the spec-repo to which you are trying to push the spec. My bad.
So if you change to
~/.cocoapods/repos/WHCoreand rungit statusthere, it should probably show the real issue.
great, thanks.
Most helpful comment
Doh! Itβs complaining about the spec-repo to which you are trying to push the spec. My bad.
So if you change to
~/.cocoapods/repos/WHCoreand rungit statusthere, it should probably show the real issue.