tworingtools 3.1.0 → 4.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9b1c737a275e5641827ae194527d442e3b66193aa207f04986fde49baf4347b
4
- data.tar.gz: 9fa221d0138418902b99203f7ad06929c8b87e7d2b270fcce6a09996659c7c47
3
+ metadata.gz: 1c1071bbf100e0bf1aba6e043d1fbf1c847f7bc300bfdcb08f682dba1dd0a7cb
4
+ data.tar.gz: 8a4872e2c877d033b7f7ed7f1b837243b6ec2c8b85b7b046790a320e24733c89
5
5
  SHA512:
6
- metadata.gz: 52ca1d901b65ddac44e48ca3232104f7473be210bce899d919432e6debc6d9b23c77e2e0406dfc3d8ac8180f3eed7dca6f5ca45d5371cf8d723b62d606eaac5e
7
- data.tar.gz: 5fc053973986ad6b0ea4139be05dc8f062e328604ddcc59a62f4518bdf2b6c6335120263c864b1b0b3c9c9f6bc31974a6dbe56b5948f44ad761d734263659774
6
+ metadata.gz: 14ef19e616343b8ac899a7105668ce8677acf37d66228a6917f99d6cf665b7366719d68aa3a6ac025ef37d504fb8394c94b989a226ce435f63290074c4721ee3
7
+ data.tar.gz: c17c74ae18617edd1d70ec1afb7c000ee45e700b2d5e0e7373a0b295ea0635447530b308485e429c5cf503a7c02b9b6ad1da9cc2ab426c0f8456051a5a7b14e1
@@ -5,7 +5,8 @@ require 'optparse'
5
5
  require_relative '../lib/git_check'
6
6
  require_relative '../lib/echoexec'
7
7
 
8
- podspec = ARGV[0]
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-name>
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
- if options[:skip_tests] != nil then
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
 
@@ -6,13 +6,14 @@ require_relative '../lib/echoexec'
6
6
  require_relative '../lib/errors'
7
7
  require_relative '../lib/git_check'
8
8
 
9
- podspec = ARGV[0]
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-name>
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 #{podspec}.podspec`.strip
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 #{podspec}.podspec #{spec_lint_flags.join ' '}"
70
+ command = "rbenv exec bundle exec pod trunk push #{podspec_path} #{spec_lint_flags.join ' '}"
70
71
  end
71
72
 
72
73
  puts command
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: 3.1.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew McKnight