New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare_command not being executed for pod spec lint #5980

Closed
odrobnik opened this Issue Sep 30, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@odrobnik

odrobnik commented Sep 30, 2016

Report

What did you do?

My podspec generates a c source file via the prepare_command.

spec.prepare_command = <<-CMD
     cd ./Core/Source
     /usr/bin/xxd -i default.css default.css.c
  CMD

I am trying to lint it:

pod spec lint --verbose

What did you expect to happen?

It should run the prepare_command of the spec and linting should pass

What happened instead?

The prepare_command is not being executed and subsequently the lint to fail. The same is true for pod trunk push which I believe does the same lint.

Note: If I run pod lib lint instead the prepare_command is executed and the lint works.

CocoaPods Environment

[in /Users/oliver/Documents/Projects]

Stack

   CocoaPods : 1.1.0.rc.2
        Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
    RubyGems : 2.5.1
        Host : Mac OS X 10.11.6 (15G31)
       Xcode : 8.0 (8A218a)
         Git : git version 2.8.4 (Apple Git-73)
Ruby lib dir : /Users/oliver/.rvm/rubies/ruby-2.3.0/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 0bd2f286e5d20a1c732f4d81f172ac8e1a9ed3ed

Installation Source

Executable Path: /Users/oliver/.rvm/rubies/ruby-2.3.0/bin/pod

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.0.0
cocoapods-try         : 1.1.0

Podfile

platform :ios, '4.3'
pod 'DTFoundation/Core' #=> works
pod 'DTCoreText' #=> works

Project that demonstrates the issue

https://github.com/Cocoanetics/DTCoreText - current develop branch.

@DanToml

This comment has been minimized.

Show comment
Hide comment
@DanToml

DanToml Oct 1, 2016

Member

This appears to be fixed on the current master branch - but your pod does appear to have a linting error on tvOS due to DTFoundation/UIKit.

Could you give that a try with https://guides.cocoapods.org/using/a-gemfile.html, and let me know if it works for you?

Member

DanToml commented Oct 1, 2016

This appears to be fixed on the current master branch - but your pod does appear to have a linting error on tvOS due to DTFoundation/UIKit.

Could you give that a try with https://guides.cocoapods.org/using/a-gemfile.html, and let me know if it works for you?

@odrobnik

This comment has been minimized.

Show comment
Hide comment
@odrobnik

odrobnik Oct 1, 2016

Note, I added a copy of the default.css.c file to the repo to get it to lint. Did you really see it run the prepare_command with the current master version?

I will try to try out the master version to see if that fixes it.

odrobnik commented Oct 1, 2016

Note, I added a copy of the default.css.c file to the repo to get it to lint. Did you really see it run the prepare_command with the current master version?

I will try to try out the master version to see if that fixes it.

@DanToml

This comment has been minimized.

Show comment
Hide comment
@DanToml

DanToml Oct 1, 2016

Member

@odrobnik I tested it by putting an exit 1 inside the prepare command

Member

DanToml commented Oct 1, 2016

@odrobnik I tested it by putting an exit 1 inside the prepare command

@odrobnik

This comment has been minimized.

Show comment
Hide comment
@odrobnik

odrobnik Oct 11, 2016

@DanToml I tested it with 1.1.0.rc.3 and here the linting problem no longer occurs.

odrobnik commented Oct 11, 2016

@DanToml I tested it with 1.1.0.rc.3 and here the linting problem no longer occurs.

@DanToml

This comment has been minimized.

Show comment
Hide comment
@DanToml

DanToml Oct 11, 2016

Member

@odrobnik Great 👍

Member

DanToml commented Oct 11, 2016

@odrobnik Great 👍

@DanToml DanToml closed this Oct 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment