Commit d87aa835 authored by Fabio Pelosin's avatar Fabio Pelosin

[Push] Silently test the trunk.cocoapods service

parent 474b1fc9
...@@ -24,15 +24,20 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -24,15 +24,20 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
* Add Bazaar support for installing directly from a repo. * Add Bazaar support for installing directly from a repo.
[Fred McCann](https://github.com/fmccann) [Fred McCann](https://github.com/fmccann)
[#1632](https://github.com/CocoaPods/CocoaPods/pull/1632) [#1632](https://github.com/CocoaPods/CocoaPods/pull/1632)
* The `pod search <query>` command now supports regular expressions * The `pod search <query>` command now supports regular expressions
for the query parameter when searching using the option `--full`. for the query parameter when searching using the option `--full`.
[Florian Hanke](https://github.com/floere) [Florian Hanke](https://github.com/floere)
[#1643][https://github.com/CocoaPods/CocoaPods/pull/1643] [#1643][https://github.com/CocoaPods/CocoaPods/pull/1643]
* pod lib lint now accepts multiple podspecs in the same folder. * Pod lib lint now accepts multiple podspecs in the same folder.
[kra Larivain/OpenTable](https://github.com/opentable) [Kra Larivain/OpenTable](https://github.com/opentable)
[#1635](https://github.com/CocoaPods/CocoaPods/pull/1635) [#1635](https://github.com/CocoaPods/CocoaPods/pull/1635)
* The `pod push` command will now silently test the upcoming CocoaPods trunk
service. The service is only tested when pushing to the master repo and the
test doesn't affect the normal workflow.
[Fabio Pelosin](https://github.com/irrationalfab)
###### Bug Fixes ###### Bug Fixes
......
...@@ -7,7 +7,7 @@ GIT ...@@ -7,7 +7,7 @@ GIT
GIT GIT
remote: https://github.com/CocoaPods/Core.git remote: https://github.com/CocoaPods/Core.git
revision: 9eee64dcf26b480444f92841d1096423fc43610c revision: 3f71c7e99a4e7919053ff00787974638fd1fdc16
branch: master branch: master
specs: specs:
cocoapods-core (0.28.0) cocoapods-core (0.28.0)
...@@ -61,6 +61,7 @@ PATH ...@@ -61,6 +61,7 @@ PATH
colored (~> 1.2) colored (~> 1.2)
escape (~> 0.0.4) escape (~> 0.0.4)
json_pure (~> 1.8) json_pure (~> 1.8)
nap (~> 0.5)
open4 (~> 1.3) open4 (~> 1.3)
xcodeproj (~> 0.14.1) xcodeproj (~> 0.14.1)
......
...@@ -38,6 +38,7 @@ s.files = Dir["lib/**/*.rb"] + %w{ bin/pod bin/sandbox-pod README.md LICENSE CHA ...@@ -38,6 +38,7 @@ s.files = Dir["lib/**/*.rb"] + %w{ bin/pod bin/sandbox-pod README.md LICENSE CHA
s.add_runtime_dependency 'json_pure', '~> 1.8' s.add_runtime_dependency 'json_pure', '~> 1.8'
s.add_runtime_dependency 'open4', '~> 1.3' s.add_runtime_dependency 'open4', '~> 1.3'
s.add_runtime_dependency 'activesupport', '>= 3.2.15', '< 4' s.add_runtime_dependency 'activesupport', '>= 3.2.15', '< 4'
s.add_runtime_dependency 'nap', '~> 0.5'
s.add_development_dependency 'bacon', '~> 1.1' s.add_development_dependency 'bacon', '~> 1.1'
......
...@@ -42,6 +42,7 @@ module Pod ...@@ -42,6 +42,7 @@ module Pod
def run def run
validate_podspec_files validate_podspec_files
test_trunk
check_repo_status check_repo_status
update_repo update_repo
add_specs_to_repo add_specs_to_repo
...@@ -57,6 +58,21 @@ module Pod ...@@ -57,6 +58,21 @@ module Pod
extend Executable extend Executable
executable :git executable :git
# @return [void] Silently test the CocoaPods trunk service.
#
def test_trunk
return unless @repo == "master"
require 'rest'
token = "65185722a2a4d074856fc07e8382e7f3"
base_url = 'https://trunk.cocoapods.org/api/v1'
podspec_files.each do |spec_file|
spec = Pod::Specification.from_file(spec_file)
REST.post("#{base_url}/pods", spec.to_yaml, 'Content-Type' => 'text/yaml', 'Authorization' => "Token #{token}")
end
rescue Exception
# Nothing
end
# Performs a full lint against the podspecs. # Performs a full lint against the podspecs.
# #
def validate_podspec_files def validate_podspec_files
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment