tworingtools 4.0.0 → 4.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c1071bbf100e0bf1aba6e043d1fbf1c847f7bc300bfdcb08f682dba1dd0a7cb
4
- data.tar.gz: 8a4872e2c877d033b7f7ed7f1b837243b6ec2c8b85b7b046790a320e24733c89
3
+ metadata.gz: 2174408f19044e8e91f1658e7dcc4bc28ae44ff0b0fdfeab9766e3314c937535
4
+ data.tar.gz: f91a05154a329e8529a679d66adf651b66f71b8e7c542b15d82de397d9fa1f41
5
5
  SHA512:
6
- metadata.gz: 14ef19e616343b8ac899a7105668ce8677acf37d66228a6917f99d6cf665b7366719d68aa3a6ac025ef37d504fb8394c94b989a226ce435f63290074c4721ee3
7
- data.tar.gz: c17c74ae18617edd1d70ec1afb7c000ee45e700b2d5e0e7373a0b295ea0635447530b308485e429c5cf503a7c02b9b6ad1da9cc2ab426c0f8456051a5a7b14e1
6
+ metadata.gz: a624262d5ecbfbd226a1f3bd5c3a3e135e1287499a1fef85893a42eaacbff19b8d2ad6688ea4f481743b98030836fa30620a26237bf7eea256e70266dbba2113
7
+ data.tar.gz: d4390c3b4cf36b0575c3b461f6a32f9b5d76bb49994c0e81ea65aea632d0ecf75ea8143eea6a57f33ff9a673f4e6bf4ead46f2225818b15d340e316df6d25786
@@ -24,9 +24,12 @@ parser = OptionParser.new do |opts|
24
24
  BANNER
25
25
  opts.on('-w', '--allow-warnings', 'Pass \'--allow-warnings\' to \'cocoapods spec lint\'.') do |force| options[:allow_warnings] = true end
26
26
  opts.on('-v', '--verbose', 'Pass \'--verbose\' to \'cocoapods spec lint\'.') do |name| options[:verbose] = true end
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
27
+ opts.on('-s', '--skip-tests', 'Pass \'--skip-tests\' to \'cocoapods spec lint\'.') do |skip_tests| options[:skip_tests] = true end
28
+ opts.on('-p', '--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
29
  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
30
  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
31
+ 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
32
+ opts.on('-rRC', '--release-candidate=RC', 'Override for the release candidate number, which is otherwise formulated by counting the previous amount of tags with the same version number and incrementing by one.') do |rc| options[:rc] = rc end
30
33
  opts.on('-h', '--help', 'Print this help message.') do
31
34
  puts opts
32
35
  exit
@@ -43,11 +46,18 @@ unless options[:no_branch] then
43
46
  end
44
47
 
45
48
  version_root = "#{current_version}-RC"
46
- release_candidate_number = `git tag --list | grep #{version_root} | wc -l`.strip.to_i + 1
49
+ release_candidate_number = String.new
50
+ if options[:rc] then
51
+ release_candidate_number = options[:rc]
52
+ else
53
+ release_candidate_number = `git tag --list | grep #{version_root} | wc -l`.strip.to_i + 1
54
+ end
47
55
  release_candidate_version = "#{version_root}#{release_candidate_number}"
48
56
 
49
57
  tag_value = String.new
50
- if options[:podspec_name_in_tag] then
58
+ if options[:tag] then
59
+ tag_value = options[:tag]
60
+ elsif options[:podspec_name_in_tag] then
51
61
  tag_value = "#{podspec}-#{release_candidate_version}"
52
62
  else
53
63
  tag_value = "#{release_candidate_version}"
@@ -74,6 +84,9 @@ end
74
84
  if options[:verbose] != nil then
75
85
  spec_lint_flags << '--verbose'
76
86
  end
87
+ if options[:skip_tests] != nil then
88
+ spec_lint_flags << '--skip-tests'
89
+ end
77
90
  stdout, stderr, status = Open3.capture3 "rbenv exec bundle exec pod spec lint #{version_file} #{spec_lint_flags.join ' '}"
78
91
 
79
92
  puts "stdout: #{stdout}"
@@ -22,10 +22,12 @@ parser = OptionParser.new do |opts|
22
22
  BANNER
23
23
  opts.on('-w', '--allow-warnings', 'Pass \'--allow-warnings\' to \'cocoapods spec lint\'.') do |force| options[:allow_warnings] = true end
24
24
  opts.on('-s', '--skip-tests', 'Pass \'--skip-tests\' to \'cocoapods spec lint\'.') do |skip_tests| options[:skip_tests] = true end
25
- 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
25
+ opts.on('-p', '--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
26
+ opts.on('-n', '--no-changelog', 'Skip operations that would normally update a CHANGELOG.md.') do |skip_changelog| options[:skip_changelog] = true end
26
27
  opts.on('-v', '--verbose', 'Pass \'--verbose\' to \'cocoapods spec lint\'.') do |name| options[:verbose] = true end
27
28
  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
28
29
  opts.on('-cCHANGELOG_PATH', '--changelog-path=CHANGELOG_PATH', '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
+ 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
29
31
  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
30
32
  opts.on('-h', '--help', 'Print this help message.') do
31
33
  puts opts
@@ -41,15 +43,23 @@ if options[:changelog_path] != nil then
41
43
  changelog_path = options[:changelog_path]
42
44
  end
43
45
  version = `vrsn --read --file #{podspec_path}`.strip
44
- name_prefix = String.new
45
- if options[:podspec_name_in_tag] then
46
- name_prefix = podspec + '-'
46
+ tag_value = String.new
47
+ if options[:tag] then
48
+ tag_value = options[:tag]
49
+ elsif options[:podspec_name_in_tag] then
50
+ tag_value = podspec + '-' + version
51
+ else
52
+ tag_value = version
47
53
  end
48
- changelog_entry_name = String.new
49
- if options[:changelog_entry_name_override] != nil then
50
- changelog_entry_name = "--name " + options[:changelog_entry_name_override]
54
+ if options[:skip_changelog] then
55
+ changelog_entry_name = String.new
56
+ if options[:changelog_entry_name_override] != nil then
57
+ changelog_entry_name = "--name " + options[:changelog_entry_name_override]
58
+ end
59
+ echo_and_exec "rbenv exec bundle exec changetag #{changelog_path} #{tag_value} #{changelog_entry_name}"
60
+ else
61
+ echo_and_exec "git tag #{tag_value}"
51
62
  end
52
- echo_and_exec "rbenv exec bundle exec changetag #{changelog_path} #{name_prefix}#{version} #{changelog_entry_name}"
53
63
  echo_and_exec 'git push --tags'
54
64
 
55
65
  spec_lint_flags = Array.new
@@ -65,7 +75,7 @@ end
65
75
 
66
76
  command = String.new
67
77
  if options[:repo] != nil then
68
- command = "rbenv exec bundle exec pod repo push #{options[:repo]} #{spec_lint_flags.join ' '}"
78
+ command = "rbenv exec bundle exec pod repo push #{options[:repo]} #{spec_lint_flags.join ' '} #{podspec_path}"
69
79
  else
70
80
  command = "rbenv exec bundle exec pod trunk push #{podspec_path} #{spec_lint_flags.join ' '}"
71
81
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tworingtools
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew McKnight
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-20 00:00:00.000000000 Z
11
+ date: 2020-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github_api