tworingtools 6.1.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/release-podspec +20 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2409b0f5d3957d1c4ca4c2c754174a93c802b193994f137480e1e6448f0d233
|
4
|
+
data.tar.gz: 344037994226cac7ed21f59672360ccc160ea110602f35af0b98038847cd4f5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
81
|
-
|
82
|
-
|
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
|
88
|
-
stdout, stderr, status = Open3.capture3 command
|
86
|
+
puts stdout
|
89
87
|
|
90
|
-
|
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
|
-
|
93
|
-
|
94
|
-
|
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
|
-
|
103
|
+
execute_command "rbenv exec bundle exec pod trunk push #{podspec_path} #{spec_lint_flags.join ' '}"
|
97
104
|
end
|