tworingtools 6.1.0 → 6.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/release-podspec +20 -13
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 220c9e3f2edc649ed5c9a1facfbc5f95d83176c19045b23eb71a36604dc8c536
4
- data.tar.gz: 5cff8d57fe3ec27d8a05bde478cd16cb48de72fed0c4a3cddc6e2fcc8228dab7
3
+ metadata.gz: d2409b0f5d3957d1c4ca4c2c754174a93c802b193994f137480e1e6448f0d233
4
+ data.tar.gz: 344037994226cac7ed21f59672360ccc160ea110602f35af0b98038847cd4f5a
5
5
  SHA512:
6
- metadata.gz: 95c16050b27aed9526b0404804e6b35db0c3bcbb237066419a4fc56c80d92bb0d58bee741823e64d08e3fceb3eda8962020386ad4814ceb09e3ead2061aeed71
7
- data.tar.gz: d19732be9665f152cb9b7d51d5d10519d6bc9de4b3072c2ff26e864a0d29a7c0347edaef3b2f76a17b7b3be09bede3a965ce42a5a86c620c9e87adc7d8495305
6
+ metadata.gz: 0e59c558135996bc8cdd57031f01b6c7c34aa8968bd068c8796d309e69000871cbd087373e5ce8fd4cd7dc0cc0e0fef609f5acf16a8e523f591bbab6a7f15f6e
7
+ data.tar.gz: 026e3c1c66a2b84c65d0845b743b82072a40bc8224396c96d506e41b8a43c0b90f071060d2b2045f3e0711ba10642ad309d89b79b330f7cc74394ce007ead10f
data/bin/release-podspec CHANGED
@@ -1,4 +1,5 @@
1
1
  #! /usr/bin/env ruby
2
+ # coding: utf-8
2
3
 
3
4
  require 'open3'
4
5
  require 'optparse'
@@ -26,6 +27,7 @@ parser = OptionParser.new do |opts|
26
27
  opts.on('-n', '--no-changelog', 'Skip operations that would normally update a CHANGELOG.md.') do |skip_changelog| options[:skip_changelog] = true end
27
28
  opts.on('-v', '--verbose', 'Pass \'--verbose\' to \'cocoapods spec lint\'.') do |name| options[:verbose] = true end
28
29
  opts.on('-rREPO', '--repo=REPO', 'By default, release-podspec pushes the podspec to CocoaPods trunk. By supplying this argument, instead of \`pod trunk push\`, \`pod repo push\` is used instead.') do |repo| options[:repo] = repo end
30
+ opts.on('-k', '--also-push-to-trunk', 'When pushing to a private repo, also push to trunk afterwards. Ignored if not using --repo.') do |also_push_to_trunk| options[:also_push_to_trunk] = true end
29
31
  opts.on('-cCHANGELOG_PATH', '--changelog-path=CHANGELOG_PATH', 'Location of a CHANGELOG document adhering to https://keepachangelog.com/en/1.0.0/ whose version entry should be extracted into an annotated tag for this release candidate. By default, release-podspec looks for //CHANGELOG.md. You can specify another location with this option.') do |changelog_path| options[:changelog_path] = changelog_path end
30
32
  opts.on('-tTAG', '--tag=TAG', 'Override for the name of the git tag to form. If set, --podspec-name-in-tag is ignored.') do |tag| options[:tag] = tag end
31
33
  opts.on('-e', '--changelog-entry=CHANGELOG_ENTRY', 'The name of the changelog entry, if it differs from the tag name.') do |changelog_entry_name_override| options[:changelog_entry_name_override] = changelog_entry_name_override end
@@ -77,21 +79,26 @@ if options[:skip_import_validation] then
77
79
  spec_lint_flags << '--skip-import-validation'
78
80
  end
79
81
 
80
- command = String.new
81
- if options[:repo] != nil then
82
- command = "rbenv exec bundle exec pod repo push #{options[:repo]} #{spec_lint_flags.join ' '} #{podspec_path}"
83
- else
84
- command = "rbenv exec bundle exec pod trunk push #{podspec_path} #{spec_lint_flags.join ' '}"
85
- end
82
+ def execute_command command
83
+ puts command
84
+ stdout, stderr, status = Open3.capture3 command
86
85
 
87
- puts command
88
- stdout, stderr, status = Open3.capture3 command
86
+ puts stdout
89
87
 
90
- puts stdout
88
+ if status != 0 then
89
+ puts "Podspec push failed:\nstderr: #{stderr}"
90
+ exit TwoRingToolError::PODSPEC_PUSH_FAILED
91
+ else
92
+ puts "Podspec pushed successfully!"
93
+ end
94
+ end
91
95
 
92
- if status != 0 then
93
- puts "Podspec push failed:\nstderr: #{stderr}"
94
- exit TwoRingToolError::PODSPEC_PUSH_FAILED
96
+ command = String.new
97
+ if options[:repo] != nil then
98
+ execute_command "rbenv exec bundle exec pod repo push #{options[:repo]} #{spec_lint_flags.join ' '} #{podspec_path}"
99
+ if options[:also_push_to_trunk] then
100
+ execute_command "rbenv exec bundle exec pod trunk push #{podspec_path} #{spec_lint_flags.join ' '}"
101
+ end
95
102
  else
96
- puts "Podspec pushed successfully!"
103
+ execute_command "rbenv exec bundle exec pod trunk push #{podspec_path} #{spec_lint_flags.join ' '}"
97
104
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tworingtools
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew McKnight