tworingtools 3.1.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/prerelease-podspec +4 -9
- data/bin/release-podspec +5 -4
- 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: 1c1071bbf100e0bf1aba6e043d1fbf1c847f7bc300bfdcb08f682dba1dd0a7cb
|
4
|
+
data.tar.gz: 8a4872e2c877d033b7f7ed7f1b837243b6ec2c8b85b7b046790a320e24733c89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14ef19e616343b8ac899a7105668ce8677acf37d66228a6917f99d6cf665b7366719d68aa3a6ac025ef37d504fb8394c94b989a226ce435f63290074c4721ee3
|
7
|
+
data.tar.gz: c17c74ae18617edd1d70ec1afb7c000ee45e700b2d5e0e7373a0b295ea0635447530b308485e429c5cf503a7c02b9b6ad1da9cc2ab426c0f8456051a5a7b14e1
|
data/bin/prerelease-podspec
CHANGED
@@ -5,7 +5,8 @@ require 'optparse'
|
|
5
5
|
require_relative '../lib/git_check'
|
6
6
|
require_relative '../lib/echoexec'
|
7
7
|
|
8
|
-
|
8
|
+
version_file = ARGV[0]
|
9
|
+
podspec = version_file.split('/')[-1].split('.podspec')[0]
|
9
10
|
|
10
11
|
# failure modes
|
11
12
|
PODSPEC_FAILED_VALIDATION = 65
|
@@ -14,7 +15,7 @@ options = {}
|
|
14
15
|
parser = OptionParser.new do |opts|
|
15
16
|
opts.banner = <<~BANNER
|
16
17
|
|
17
|
-
Usage: prerelease-podspec [options] <podspec-
|
18
|
+
Usage: prerelease-podspec [options] <podspec-path>
|
18
19
|
|
19
20
|
Branch and create/push a release candidate tag, modify the podspec to use that version tag, and try linting it.
|
20
21
|
|
@@ -23,7 +24,6 @@ parser = OptionParser.new do |opts|
|
|
23
24
|
BANNER
|
24
25
|
opts.on('-w', '--allow-warnings', 'Pass \'--allow-warnings\' to \'cocoapods spec lint\'.') do |force| options[:allow_warnings] = true end
|
25
26
|
opts.on('-v', '--verbose', 'Pass \'--verbose\' to \'cocoapods spec lint\'.') do |name| options[:verbose] = true end
|
26
|
-
opts.on('-s', '--skip-tests', 'Pass \'--skip-tests\' to \'cocoapods spec lint\'.') do |skip_tests| options[:skip_tests] = true end
|
27
27
|
opts.on('-n', '--podspec-name-in-tag', 'When forming the tag name for a release candidate, prefix the podspec‘s name to the version string. Helps when you have multiple podspecs in a repository and tag versions for each.') do |podspec_name_in_tag| options[:podspec_name_in_tag] = true end
|
28
28
|
opts.on('-n', '--no-branch', 'Make any changes on the current branch instead of creating a temporary new branch.') do |no_branch| options[:no_branch] = true end
|
29
29
|
opts.on('-cCHANGELOG', '--changelog=CHANGELOG', '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.') do |changelog| options[:changelog] = changelog end
|
@@ -36,8 +36,6 @@ parser.parse!
|
|
36
36
|
|
37
37
|
git_check unless options[:no_commit]
|
38
38
|
|
39
|
-
version_file = "#{podspec}.podspec"
|
40
|
-
|
41
39
|
current_version = `vrsn --read --file #{version_file}`.strip
|
42
40
|
unless options[:no_branch] then
|
43
41
|
branch = "#{podspec}-#{current_version}-release"
|
@@ -76,10 +74,7 @@ end
|
|
76
74
|
if options[:verbose] != nil then
|
77
75
|
spec_lint_flags << '--verbose'
|
78
76
|
end
|
79
|
-
|
80
|
-
spec_lint_flags << '--skip-tests'
|
81
|
-
end
|
82
|
-
stdout, stderr, status = Open3.capture3 "rbenv exec bundle exec pod spec lint #{podspec}.podspec #{spec_lint_flags.join ' '}"
|
77
|
+
stdout, stderr, status = Open3.capture3 "rbenv exec bundle exec pod spec lint #{version_file} #{spec_lint_flags.join ' '}"
|
83
78
|
|
84
79
|
puts "stdout: #{stdout}"
|
85
80
|
|
data/bin/release-podspec
CHANGED
@@ -6,13 +6,14 @@ require_relative '../lib/echoexec'
|
|
6
6
|
require_relative '../lib/errors'
|
7
7
|
require_relative '../lib/git_check'
|
8
8
|
|
9
|
-
|
9
|
+
podspec_path = ARGV[0]
|
10
|
+
podspec = podspec_path.split('/')[-1].split('.podspec')[0]
|
10
11
|
|
11
12
|
options = {}
|
12
13
|
parser = OptionParser.new do |opts|
|
13
14
|
opts.banner = <<~BANNER
|
14
15
|
|
15
|
-
Usage: release-podspec [options] <podspec-
|
16
|
+
Usage: release-podspec [options] <podspec-path>
|
16
17
|
|
17
18
|
Form Git tags and push them to remote, then push the podspec to CocoaPods trunk.
|
18
19
|
|
@@ -39,7 +40,7 @@ changelog_path = 'CHANGELOG.md'
|
|
39
40
|
if options[:changelog_path] != nil then
|
40
41
|
changelog_path = options[:changelog_path]
|
41
42
|
end
|
42
|
-
version = `vrsn --read --file #{
|
43
|
+
version = `vrsn --read --file #{podspec_path}`.strip
|
43
44
|
name_prefix = String.new
|
44
45
|
if options[:podspec_name_in_tag] then
|
45
46
|
name_prefix = podspec + '-'
|
@@ -66,7 +67,7 @@ command = String.new
|
|
66
67
|
if options[:repo] != nil then
|
67
68
|
command = "rbenv exec bundle exec pod repo push #{options[:repo]} #{spec_lint_flags.join ' '}"
|
68
69
|
else
|
69
|
-
command = "rbenv exec bundle exec pod trunk push #{
|
70
|
+
command = "rbenv exec bundle exec pod trunk push #{podspec_path} #{spec_lint_flags.join ' '}"
|
70
71
|
end
|
71
72
|
|
72
73
|
puts command
|