GithubHelp home page GithubHelp logo

youdaomobile / cocoapods-dev-env Goto Github PK

View Code? Open in Web Editor NEW
16.0 1.0 2.0 143 KB

cocoapods-dev-env is a cocoapods plugin to switch pod to local path easyly

License: MIT License

Ruby 99.68% Shell 0.32%

cocoapods-dev-env's Introduction

Cocoapods Plugin: cocoapods-dev-env

cocoapods-dev-env is a useful plugin for cocoapods to manage your self-developing pods.

When we have too many pod to developing, maybe you only care about one or two pods in local, this plugin may be can help you.

Installation

Add this line to your application's Gemfile:

gem 'cocoapods-dev-env'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cocoapods-dev-env

Usage

In your podfile

plugin 'cocoapods-dev-env'

pod 'SomePod', :git => 'xxxxxx', :branch => 'master', :tag => '0.0.2.2', :dev_env => 'dev'

We see a addtional key "dev_env" in defineation. And you must put "git", "branch", "tag" for the plugin.

  1. When you define "dev_env" to "dev", and run pod install .
    We will add a git submodule linked to your pod git repo to local.
    And check if the HEAD commit id of the branch is same to tagcommit id.

  2. When you define "dev_env" to "beta", and run pod install .
    We will use the tag: "tag_beta", e.g.: "0.0.2.2_beta"
    When the local git submodule is exist, whe aslo try to check and add tag "tag_beta" on it and push to the origin.
    Finally the state clean submodule will be removed automatically.

  3. When you define "dev_env" to "release", and run pod install . We want to use the release version in cocoapods repo. And do many check for state, and help you to release the not released pod.

2.2.x 新增功能: 支持读取宿主工程的Podfile.lock文件,来获取宿主工程中的依赖,无需在单独的库的example工程中引用对应的pod 此功能默认开启, 等同于在顶部写入如下配置: use_parent_lock_info! 关闭方法 use_parent_lock_info! false 宿主工程路径默认为"../../../"(因为默认放到developing_pods子文件夹下,对应的库文件夹下的Example文件夹下,故需要回溯三层) 配置宿主工程相对路径的方法 use_parent_lock_info! :path => '../' 暂不支持配置绝对路径,未来也不建议配置绝对路径指向固定的位置

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/YoudaoMobile/cocoapods-dev-env. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

prepare

install gem bundler:

gem install bundler

create Gemfile:

bundler init

edit GemFile for local path, e.g.:

gem 'cocoapods'
gem 'cocoapods-dev-env', :path => '../cocoapods-dev-env'

debug and package

  1. How to develop: put gem in your project and exec bundle exec pod install
  2. How to packagae: rake build
  3. How to release: rake release or gem push ./pkg/cocoapods-dev-env-0.2.2.gem

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Cocoapods::Dev::Env project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

cocoapods-dev-env's People

Contributors

mumuworld avatar wudijimao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.