Skip to content

Commit

Permalink
ci: add publish to cocoapods repo task
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyamahunt committed Mar 10, 2022
1 parent 8533300 commit 8bbac4d
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ jobs:
# with:
# ruby-version: ${{ env.RUBY_VER }}

# - name: Install dependencies
# run: |
# bundle config deployment true
# bundle install

# - name: Build gem
# if: steps.conventional_changelog.outputs.skipped == 'false'
# run: gem build *.gemspec
Expand Down Expand Up @@ -134,3 +139,7 @@ jobs:
# tag: ${{ steps.conventional_changelog.outputs.tag }}
# body: ${{ steps.conventional_changelog.outputs.changelog }}
# artifacts: '*.gem'

# - name: Publish to cocoapods plugins
# if: steps.conventional_changelog.outputs.skipped == 'false'
# run: bundle exec rake publish
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ gemspec

group :development do
gem 'cocoapods'
gem 'cocoapods-plugins'

gem 'mocha'
gem 'bacon'
gem 'mocha-on-bacon'
gem 'prettybacon'
gem 'github_api'
end
47 changes: 47 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -64,32 +64,77 @@ GEM
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.9)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
escape (0.0.4)
ethon (0.15.0)
ffi (>= 1.15.0)
faraday (1.10.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.3)
multipart-post (>= 1.2, < 3)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
ffi (1.15.5)
fileutils (1.6.0)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
github_api (0.19.0)
addressable (~> 2.4)
descendants_tracker (~> 0.0.4)
faraday (>= 0.8, < 2)
hashie (~> 3.5, >= 3.5.2)
oauth2 (~> 1.0)
hashie (3.6.0)
httpclient (2.8.3)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
json (2.6.1)
jwt (2.3.0)
minitest (5.15.0)
mocha (1.13.0)
mocha-on-bacon (0.2.3)
mocha (>= 0.13.0)
molinillo (0.8.0)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
oauth2 (1.4.9)
faraday (>= 0.17.3, < 3.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
prettybacon (0.0.2)
bacon (~> 1.2)
public_suffix (4.0.6)
rack (2.2.3)
rake (13.0.6)
rexml (3.2.5)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
thread_safe (0.3.6)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.4)
Expand All @@ -114,6 +159,8 @@ DEPENDENCIES
bundler
cocoapods
cocoapods-embed-flutter!
cocoapods-plugins
github_api
mocha
mocha-on-bacon
prettybacon
Expand Down
15 changes: 15 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,20 @@ task :demo do
end
end

desc 'Publish to cocoapods plugins if not present'
task :publish do
require 'rubygems'
gem = Gem::Specification::load(Dir['*.gemspec'].first)

require 'cocoapods'
require 'pod/command/plugins_helper'
known_plugins = Pod::Command::PluginsHelper.known_plugins
return if known_plugins.one? { |plugin| plugin['gem'] == gem.name }

require 'github_api'
return if Github.search.issues(q: "#{gem.name} user:CocoaPods repo:CocoaPods/cocoapods-plugins in:title").items.count > 0
system('pod plugins publish', exception: true)
end

task :default => :specs

1 change: 0 additions & 1 deletion lib/cocoapods-embed-flutter/gem_version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
module CocoapodsEmbedFlutter
VERSION = '0.5.0'.freeze
NAME = 'cocoapods-embed-flutter'
end

0 comments on commit 8bbac4d

Please sign in to comment.